learning C

Steve Holden sholden at holdenweb.com
Tue Mar 13 08:33:10 CET 2001

"Alan Gauld" <alan.gauld at bt.com> wrote in message
news:3AACE22D.3A9EEB12 at bt.com...
> Werner Schiendl wrote:
> > Unsafe is somewhat the same topic I think: It's a question
> > of disciplined use.
> I think one problem with C++ is the number of temporary objects
> it creates.
[ ... ]
> In C, by virtue of its fixed primitive types, is much easier
> to gurantee what will happen by way of memory allocation etc.
> > > There's the feeling that you never quite know what it's
> > > going to do.
> Temporary objects being one such case. Others include the use of
> operator overloading, function overloading vv default parameters
> etc etc. C++ is a maintenance nightmare compared to C - I speak
> from 18 months painful experience maintaining a large C++ system!
> > You can have the same in C++ (using one or more static objects,
> > or construct the objects just once when booting)
> Even here the compiler will cause tempoiray object copies to
> occur when passing object references around. Static objects are
> not as 'static' as we might like to think!
> > This is nothing more difficult than in C.
> Sorry but it is. There's just so much less lurking under
> the hood in C.
But by this argument, assembly code is even better!  It's always a question
of selecting language features because they are appropriate to your problem

or-doing-what-the-pointy-haired-managers-tell-you-ly y'rs  - steve

More information about the Python-list mailing list