[Top][All Lists]

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

Re: OT: C++, yuck!

From: Thomas S. Urban
Subject: Re: OT: C++, yuck!
Date: Wed, 27 Feb 2002 01:19:22 -0800
User-agent: Mutt/1.3.21i

On Wed, Feb 27, 2002 at 02:39:42 -0500, Greg A. Woods sent 3.1K bytes:
> [ On Tuesday, February 26, 2002 at 21:00:34 (-0800), Gianni Mariani wrote: ]
> > Subject: Re: OT:  C++, yuck!
> > 
> > You can't be serious !
> Well yes I am _VERY_ serious about how bad C++ is in general.

Ok, this is way off topic, but I'm curious what you think the bad
features of C++ are?  I keep reading how bad you think it is, but not
really why?  And I mean the langauge, not portability - I talk about
that a bit later.

> > *Every* language has problems.  There is no panacea.
> I couldn't agree more!  C++ just has more than its fair share of
> problems.  ;-)

How do you figure?  C has 6 problems and C++ has 6 + 4, therefore it has

I do a third or more of my professional work in C++, and I generally
like the langauge: it is very appropriate is some circumstances, less so
in others. But I am also of the opinion that it is easy to misuse the
langauge.  There are a couple features, like operator overloading, that
I think would have been better left out of the langauge, but even those
can be fine if used with restraint.

There are some portability problems, but if you're careful, you can
avoid them rather easily - in practice, this typically means avoiding
templates unless you're sure they're supported by all the compilers you
use. For many people, they only have to support up-to-date compilers.
For some older compilers, you might need to avoid namespaces as well.
Supporting really old C++ compilers shouldn't be required of most
development shops, I would hope. Etc.  Really, in my experience, it's
not all that bad.

Their are certain problems that are more easily solved with the features
of C++ than C.  True, they can also be solved by other OO languages, but
C++ is better over those alternatives in many circumstances for other
reasons (availability, libraries, C linking issues, availablity of
tools, and even just the somewhat arbitrary fact that it might be easier
to find developers who know C++ compared to smalltalk, for example.)

In short, C++ is a good langauge if your developers know how to use it,
and it has the features you need, and is apprpriate for your domain
(most of them), and you know you won't have to use some broken compiler
that doesn't support some feature you need.  The same can be said about
most any language I think.

I should be ignoring you rather than feeding the flames of this never
ending thread, but what the hell, it's late and I can't sleep.

My reply above this line is a serious enquiry.  Below this line, I'm
going for insults and laughs only.


> > I happen to think that C++ has a large number of positive things going 
> > for it
> I think if you could find someone to do a careful and impartial academic
> study of C++ you would find that it has many more negative aspects it
> than it has positive aspects.

I think you're wrong.  No, let me make my completely unsupported opinion
sound more valid.  I think if you do a careful impartial academic
analysis of C++ you'll find that the negative aspects don't outweigh the
positive aspects.  Whatever that means.

> > and it's much further along the track of stabilization than any 
> > other language with it's capabilities.
> What, exactly, can that possibly mean?  If you mean "standardization",
> then you're wrong.

Asserted.  Still waiting ....

> Yes I wish ANSI et al would quit messing with C and inventing new
> features and mis-features, but in reality there are more than enough
> good compilers that all implement the same C language that you really
> can't call it unstable in any way.  Common C++ compilers have much more
> variation than C compilers and it is widely known and accepted that C++
> code is inevitably far less portable than C code unless you stick to one
> multi-platform compiler.

Is this in regards to the C98 (or is it C99) specification?  How
portable are those features right now ;)  I think your "far-less
portable" might be a little exagerated. No, make that exagerated from
here to the moon and back.  It all depends on your domain (archs,
compilers, features).  Damn it, I'm getting to serious again.

> > So, even though C++ has "niggling yucky details" it is the Right(tm) 
> > choice for many applications; and for a large subset, the only suitable 
> > language.
> Oh, P'lleeeeze!  You've got to be kidding.  Either that or you've been
> poorly brainwashed, or have gone insane, or something.

Either you like to have sex with goats or you're are wrong.  Please pick

> I've read articles and papers that just barely manage to justify the
> choice of C++ for some projects, but they only succeed at this
> justification by hiding all but a tiny set of token problems under their
> not so perfect carpets.

Greg read articles.

> I've read multiple rebutals to those articles and papers which give more
> than equal justification for choosing alternate languages.

Then he read some rebuttals.

He agreed with the rebuttals.


> Even Ada can be more easily justified for a random project than C++!

Yeah, there aren't any issues with finding compilers for Ada for a given
architecture.  Of course, you'll likely be doing a single vendor
solution if you do find one for all the archs you need, which, surprise,
eliminates many portability problems when you do the same things with
C++. Or whatever.

> If you can't justify using C for a project (on language merits alone)
> then C++ is right out of the running from the get go!

That is silly.  What if you could justify C, except you need dynamic
binding too? Then could you justify C++?  What about you need all the
features of C, with generic programming as well?  Then is C++ back in
the running?

<ho, hum, yawn, snip, goodnight>

Being popular is important.  Otherwise people might not like you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]