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

Re: c++ 2.1 diffs

>From vlad!mark Wed Jun 27 22:42:33 1990
	From: vlad!mark (Mark S. Miller)
	To: roger@xxxxxxxxxxx, xtech@xxxxxxxxxxx
	Subject: c++ 2.1 diffs
	   Date: Wed, 27 Jun 90 14:42:46 PDT
	   From: xanadu!roger (Roger Gregory)
	   4. The correct syntax for deleting an array is "delete [] p;".  The former
	   syntax, in which an expression within the brackets was required to give the
	   number of elements in the array being deleted, is now officially an
	   anachronism.  [Implemented.]
	Mr. Hill & Roger:  forget what I said before.  Since "operator new(..)"
	and "operator delete (..)" can be provided by the user, I don't see
	how it is *possible* for the language to implement this.  (For those
	who missed the verbal conversation) The issue is: if you are deleting
	an array of objects with destructors, how does C++ know how many
	destructors to invoke?  I'll investigate in the A.R.M. (The new
	Annotated Reference Manual by Ellis & Stroustrup).  Is this an issue
	for us (i.e., do PrimArrays need it?)

No, it's not an issue for us.  PrimArrays don't destruct their contents.
I was only concerned with item #4 since it looked like evidence of a level
of bozoness in the language that could pop up in annoying places.