Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 1999 18:01:51 -0500
From:      "G. Adam Stanislav" <adam@whizkidtech.net>
To:        Chuck Robey <chuckr@picnic.mat.net>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: c9x (new ANSI C)
Message-ID:  <19990519180151.A226@whizkidtech.net>
In-Reply-To: <Pine.BSF.4.10.9905191811090.69006-100000@picnic.mat.net>; from Chuck Robey on Wed, May 19, 1999 at 06:16:04PM -0400
References:  <19990519170823.A240@whizkidtech.net> <Pine.BSF.4.10.9905191811090.69006-100000@picnic.mat.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 19, 1999 at 06:16:04PM -0400, Chuck Robey wrote:
> I tell you, I must say that the new spec, from what I've heard (and some
> limited reading of magazine articles), brings in a lot of C++ to C, and
> really is a gift to compiler vendors.  No changes *I'd* want.

Ye, gods! You're scaring me. I tried C++ several years ago, studying it from
the MS Visual C++ tutorial. What I read impressed me very much until I
actually tried it. Ever since: C++? No thank you!

I wrote a video special effects library in it. After I compiled it to assembly
language, I was horified. All constructors doing nothing but calling other
constructors doing nothing but calling other cons.... Same with destructors.

And the MS book was outright lying (gee, surprise): It claimed that one of the
biggest advantages of C++ over C is that if you change the C++ class, you need
not recompile the code using it. What a piece of bunk. In C++ the caller
allocates the memory called by the class. If you make the class bigger,
recompile the class library but not the calling code, you may expect serious
trouble! It should be the constructor that allocates the memory; the
destructor that frees it. That way you could rely on having exactly the
amount of memory needed for each class no matter what version of the class
library you use.

> Of course, the only OO language I care for is Java, being that it's far
> simpler than C++.

The only OO language I care for is assembly language. :-) It's amazing how OO
you can get when you call all the shots. :-) For example, I always pass the
"this" pointer in ECX. Then I start every function with a jecxz so I cannot
inadvertantly use a null pointer.

> Becoming well versed in C++ has meant that I can now bore you endlessly
> with well expressed reasons why I dislike C++.  Now you have all the
> language propeller-heads wanting to change C into a C++ lookalike.

Ouch. Please noooooooooooooo!!!!!!!!!!

Adam


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990519180151.A226>