From owner-freebsd-hackers Wed May 19 16: 2:49 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from whizkidtech.net (r28.bfm.org [208.18.213.124]) by hub.freebsd.org (Postfix) with ESMTP id E06E014DBE for ; Wed, 19 May 1999 16:02:42 -0700 (PDT) (envelope-from adam@whizkidtech.net) Received: (from adam@localhost) by whizkidtech.net (8.9.2/8.9.2) id SAA00240; Wed, 19 May 1999 18:02:23 -0500 (CDT) (envelope-from adam) Date: Wed, 19 May 1999 18:01:51 -0500 From: "G. Adam Stanislav" To: Chuck Robey Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: c9x (new ANSI C) Message-ID: <19990519180151.A226@whizkidtech.net> References: <19990519170823.A240@whizkidtech.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: ; from Chuck Robey on Wed, May 19, 1999 at 06:16:04PM -0400 Organization: Whiz Kid Technomagic X-URL: http://www.whizkidtech.net/ X-Operating-System: FreeBSD whizkidtech.net 3.1-RELEASE FreeBSD 3.1-RELEASE Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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