Re: Languages

From: Christian Loth (sg618lo@unidui.uni-duisburg.de)
Date: 03/10/99


Greetings,

Am Fre, 05 Mär 1999 schrieb George:
> On Fri, 5 Mar 1999, John Hines wrote:
>
> >Well to be truthful...What's wrong with sticking to a good plan?
> >
> >I have yet to experience any troubles with C even though people
> >will tell you as fast as they can the limitations of C. Then again
> >what do I know...
>
> My biggest complaint with C++ is the gratuitous random variable placement
> in the middle of a function.  That becomes more an issue of not doing it
> (and preventing others from doing it) than a language problem though.

But in C++ this 'freedom of variable placement' is based on a
performance consideration. Imagine you have three or four pretty
complex classes, with pretty complex contructors. Now there's
a function in your code where you need to use instances of all
those classes.

In C style you would declare them all at the beginning...but that
would also include the costs of constructions for your classes...
...whereas if you declare them where you actually need them you
only have those costs if you need those costs.

However, I think it was Stroustroup who said, that with C++
you can shoot your foot off...he's right. C++ offers great freedom,
in *any* aspect (both in coding paradigm (OOP vs. structured etc)
but also in personal coding style). Take the wrong turn, you can
wave bye bye to your foot ;)

- Chris

--
Christian Loth
Coder of 'Project Gidayu'
Computer Science Student, University of Dortmund
sg618lo@uni-duisburg.de - chloth00@marvin.cs.uni-dortmund.de


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST