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 majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message