[ale] Language Jihad!

Benjamin Scherrey scherrey at innoverse.com
Wed Jul 18 15:37:28 EDT 2001


On Wednesday 18 July 2001 03:10 pm, Wandered Inn wrote:
> Benjamin Scherrey wrote:
> > C++ is one of the
> > only languages that doesn't pretend otherwise. I've been developing
> > platform-independent (this is different than just portable) software
> > using C++ since 1990. I guess this means that I write C++ properly and
> > reuse code. I know several others who do as well.
>
> Take it as a figure of speech.  I know there are folks out there who 'do
> it the right way.'  That is the way it should be.  The key is, you must
> have a good understanding of OO concepts, or you're doomed to fail.

	You certainly must grok the paradigm but I've done a lot of C++ that used 
little, if any OO. C++ also supports functional programming concepts pretty 
strongly through its template mechanisms. Of course, OO is the "killer app" 
that C++ was designed for so your statement is generally true.

>
> > Indeed, myself and a group of three
> > other developers did in six months what was predicted to require a group
> > of 25 C programmers two years to acomplish. This kind of productivity
> > improvement is common in projects I've participated in.
>
> I don't believe it.  Maybe if it's because the comparison was apples to
> oranges, in that you reused C++ code, verses the C programmers doing it
> from scratch.  Otherwise, someone's blowing smoke.

	The C++ project was entirely from scratch, including the architecture. The C 
option had many pre-existing internal libraries to build from. The managers 
didn't believe it either but since it was a pain in the butt project that 
didn't promise much revenue, they decided to give us a chance cause losing 
six months with a few people wasn't going to be a huge overrun compared to 25 
people and two years which they decided they really did have to throw at it.

> >         Critics of C++ claim its too complex. Certainly, to use all of
> > C++, you've got a long learning curve. However, its not necessary to know
> > more than 25% of the language's features to take great advantage of it.
>
> This is ludicrous.  So which 25% do you learn?  How do you know you're
> doing it the right way if you don't know the language?

	Its not ludicrous at all. Reconsider your definition of the language. How 
much of your C code is the "C" language vs. C with a lot of standard library 
functions. Well, the same is true of C++. The C++ standard library is huge. 
However, a little knowledge of some of the string interface and a couple of 
containers, throw in a class or two and perhaps some inheritence and 
suddenly you don't have to know the idiocyncracies of pointers to do useful 
work. Its not necessary to know RTTI, exceptions, templates, most of the 
stdc++lib, etc. to get useful code out of C++. The strong typing and const 
correctness of the language produces much better error messages and prevents 
most runtime errors that plauge new (and old) C programmers. The nice thing 
is that, as you need techniques provided by exceptions or templates, you can 
evolve into them on as as-needed basis. This is the marvel of "don't pay for 
what you don't use".

> > C++ was designed
> > with the concept in mind that "you don't pay for what you don't use". So
> > long as it keeps to this credo the language will endure forever. FWIW,
> > its similarities to C are sometimes unfortunate
>
> Seeing as how it's a super set of C, it's kind of difficult for it to
> NOT be similar to C.

	When you really know and use C++ the way its intended, the major 
similarities are the use of curly braces and the operators for accessing 
struct/class members. The entire form of your code and style are completely 
different. You really need to know C++ to understand this.

	regards & later,

		Ben Scherrey
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list