Re: OT: Why is C so popular?
On Wednesday 27 August 2003 07:27, Paul Johnson wrote:
> I do have to ask this one: It's possible to write
> non-braindamaged code in C++ without learning C first?
Yes. But I think it's more fun to learn OO using Python than it is using C++.
And now to over-analyse the term "brain-damaged".
Mixing C style (e.g., functions and data structures) and techniques (e.g.,
CPU and memory awareness) in C++ code (with its abstractions using
hierarchical objects and templates) is "brain-damaged" to some critics.
But even if you use C++ correctly, your object space may be conceived in a
way that is different from how you critic perceives the object space. In
this case your code will be "brain-damaged"
Solution? Learn C because it's the lingua franca and it works well. The OO
learning curve with Python is manageable, so learn Python to build OO
solutions. Java is probably a great OO choice too - I haven't cracked that
nut yet. The Sun control of Java seems a little...closed...to me.
C++ works perfectly for me precisely because it is a mixes C and C++ so
easily. I work on a bit-oriented protocol (C part) that I manage with some
OO techniques (C++ part). I think my code will earn a place of honor in the
"brain-damaged" C++ hall of fame.
Recently SCO showed some "offending" code and the chuck was determined to be
a memory allocator written by some UNIX and C progenitors. Linus said it was
removed from 2.6 by someone because it was judged to be "ugly". Ugly.
Brain-damaged. Crappy. Nasty. What's the difference? Code that is deemed
beautiful or clever is often either incomprehensible or obvious.
Code that works is a gift.
--
Mike Mueller
324881 (08/20/2003)
Make clockwise circles on the floor with your right foot; now, without
looking at your foot, use the index finger on your right hand to draw the
number "6" in the air
Reply to: