On Sun, May 23, 2010 at 11:07:27PM +0200, Olivier Guilyardi wrote:
On 05/23/2010 10:22 PM, Chris Cannam wrote:
[...]
... by which I don't mean to imply that I
can't understand it
(although, with C++, there is always the possibility that I _think_ I
can understand it but am sadly mistaken because of some weird shit
happening behind the scenes). I just mean that I can't simply read
it.
I once read a great (and funny) article arguing that you simple can't assume
anything about what the following means in C++:
a = b + c
Nothing
yeah. but if thats not a concatenation or an addition the programmer of
the operator overload should be shot on sight.
This may be one really serious advantage for the
everything-in-C types
-- a competent C programmer can understand any C, whereas C++ is big
enough to have many different "schools of C++" which are mutually
unintelligible without further study.
That's also the seed of its popularity, I suppose -- everyone can
write the way they like in it, and if you can't work out how to do it
properly, you can always drop back into C.
Yeah, C rocks :-)
But, the problem is that, in my experience, C++ can increase productivity by a
factor of x10 or so over C. It's my personal experience. Very often, I have to
consider making a choice between the two, and I often end up coding the engine
in C and the rest in C++ or a dynamic language.
hmm.. i dont really see the advantage of writing an engine in C.
first of all you loose RAII locks.
http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization
then you need to manage most memory yourself again....
could you explain your reasons a bit more ?
But maybe that, with experience and methodology, one can get as productive in C
as in C++? I suppose the guys at Gnome would agree with that..
there is a reason why gob2 and vala emerged.
writing a GObject in C is a pretty big PITA.
its probably possible to create the boilerplate out of some kind of
template.
but i am not aware of some rails/paster like framework to create this
boilerplate with a single command.
--
Olivier
--
torben Hohn