From -7703100256691410250
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,1ac63fff730e7d59
X-Google-Attributes: gidf78e5,public
From: Valentin Bonnard <Bonnard.V@wanadoo.fr>
Subject: Re: C++ Memory Allocation Bashing
Date: 1999/08/13
Message-ID: <37B4548F.20AC@wanadoo.fr>#1/1
X-Deja-AN: 512332163
Content-Transfer-Encoding: 7bit
Approved: Valentin Bonnard <bonnard@clipper.ens.fr>
References: <37b445e8.82613572@news.airmail.net> <37B42996.4580B88E@lucent.com>
X-Original-Date: Fri, 13 Aug 1999 19:23:27 +0200
Content-Type: text/plain; charset=us-ascii
Organization: Ecole normale superieure
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUAN7RVCawEuYhIxRhxAQG09AIAkVQbKgYKWAs+sFFfgnDgFhk5cgQG2MGz hSQ4niVO1N8sSPQoCz5PA6CBoHtAOgw3SLqWa0wBXj/UtB97KsvW9A== =ej6w
Mime-Version: 1.0
Newsgroups: comp.std.c++

Salters wrote:
> 
> William H. Bloodworth wrote:

> > Would anyone (Bjarne preferably) care to comment the information presented on C++ memory
> > allocation at this location:  http://www.pdos.lcs.mit.edu/~dm/c++-new.html ?

> The author isn't familiar enough with C++ to pass judgement:

Congratulation ! You have apparently been able to read this 
text up to the end. (I haven't.)

> "Except for automatic variables, operator new is the only way
>  to call an object's constructor in C++. "
> 
> Wrong. The trivial omission is that he missed globals, 

and temporaries created explicitly (ex T (1, "a")), 
ctor-init-member-list...

> #define NEW new (dmalloc, __FILE__, __LINE__)
> #define new NEW

A lengthy way to write:

#define new new (dmalloc, __FILE__, __LINE__)

which shows that he doesn't even understand the 
preprocessor.

> No contest.

I strongly advise that Bjarne do _not_ loose time on 
this rant, except perhaps for fun.

When reading such ``why C++ is bad'' descriptions, 
I often^Walways discover that the author doesn't have 
any clue about C++, how to use it, that it has evolved 
since the ARM. It's funny, because there are possible 
critics against C++ but I never see them anywhere.

-- 

Valentin Bonnard
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



