alternatives to VLA

Matt Austern uunet!physics.Berkeley.EDU!matt
Fri Feb 19 10:28:26 PST 1993


> With C++, you can have constructors and destructors automatically
> handle the memory allocation, conceal annoying dimension parameters,
> and even overload operators.

That's my real feeling about variable-length arrays: like I/O, they
shouldn't be part of the language.  C doesn't provide users the
necessary functionality to implement them well, but C++ does.

Even though it isn't really within the scope of NCEG, it isn't any
secret that C++ is becoming more and more popular.  I think we ought
to be considering what we really want from arrays, and how they could
be implemented as a C++ class.  Only if it turns out that it is
impossible to implement them as a class should we talk about modifying
the C (and, by extension, C++) language. 

			--matt




More information about the Numeric-interest mailing list