From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2007-04-08 20:06:28
Jeff Garland wrote:
> Everyone that thinks C++ isn't good for CGI or Web programming more generally,
> needs only to go to google.com to see C++ in action. BTW, they recently open
> sourced their c++ templating engine
> (http://code.google.com/p/google-ctemplate/) used to create various sites.
Note, before reading my critics, that I only went to the link you gave
and had a quick look.
The template language is not especially impressive, it's very basic stuff.
I think better languages can be designed.
And the API is not only unimpressive, it also seems pretty bad.
To begin with, the code isn't even valid C++ as it uses ' for strings
instead of ".
It also includes a standard C header instead of the C++ compatible one,
uses a bad way to distribute randomness, uses different functions
instead of overloading, uses pointers and even worse, the address-of
operator instead of things that probably should be references or
eventually shared_ptr to share the template throughout the program,
writes the output to an std::string (which is taken by pointer instead
> Scripting languages have gotten most of the attention in web programming
> because there easier for small applications
That's not only "for small applications".
I think you can't expect developers working in web programming to simply
be as competent as developers working on say, more advanced matters.
This is because the web is trendy and easy to access, lots of
inexperienced people are working on it, and there are even quick study
courses in some universities nowadays specific for web development.
As a result, that kind of developers can't design software as well. And
for that, automagic management of resources is what helps.
> and they have a fully complete
> 'software stack' for development of web-apps in an easy bundle.
Certainly, what defines those new scripting languages seems to be at
least as much their standard library as themselves.
But those languages usually have a reference implementation, backed up
by an active group or company that invests lots of money/time in its
That is quite different with C++.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk