[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c code vs c++ code



Jason Stechschulte wrote:

> I know, but I tried to write the question in such a way as to ask if it
> is mainly preference or not, instead of asking which is better.

Yes - but people have their preferences because they think their way 
is somehow better.   I doubt people ever flip a coin to decide whether
to use (for example) stdio or streams.

The problem is that one person's idea of 'better' may be different
from others.  Some people choose because of runtime efficiency, others
for brevity of code, others out of familiarity, others because of
legibility, others because they want more compile time checking, yet
others because they don't like the compiler cramping their style.

The reason language wars are so nasty is because no two people have
exactly the same criteria for 'better'.  You can measure which
language produces the fastest code - and you can measure which takes
fewest lines of code to implement a particular algorithm - but you
can never decide whether speed or brevity is "better"...toss in the
other dozen measures of goodness and you have a nicely inflammable
subject for debate.

---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1@airmail.net>    WorkEmail: <sjbaker@link.com>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sf.net    http://tuxaqfh.sf.net
            http://tuxkart.sf.net http://prettypoly.sf.net