Article View: comp.std.c++
Article #3898Re: delete vs incomplete class type
From: Martin J. Maney
Date: Wed, 03 Apr 1996 03:06
Date: Wed, 03 Apr 1996 03:06
34 lines
2649 bytes
2649 bytes
Steven Correll (sjc@netcom.com) wrote: > Your argument is so persuasive that I withdraw my question and ask a > different one: why the silly rule that a function must be declared > before it can be invoked? If C++ were rid of that rule, it would be > much easier to port legacy C code which has been partly converted to > C++. Of course, such code will often crash in nigh-impossible-to-debug > ways, but we wouldn't want a compiler to reject such code as > ill-formed; this is a "quality of implementation" issue, or perhaps a > job for a lint++ tool which could, by examining source files that are > not normally compiled together, determine whether or not the compiler > was right when it inferred the formal argument types based on the > actual argument types. > :-) This would be more amusing if it weren't so well laced with half-plausible misdirection, such as the amusing inversion of the role of function declarations and lint. I'm not sure I really want to defend the decision about delete of an incomplete type, and I agree with Steve Clamage that making it ill-defined is certainly the only other reasonable choice. Having had to deal with hybrid code that might have done this very thing - I'm not really certain, and don't have the sources around to look over any longer - I really do think it possible that there is code in use that might be broken by that change. Not that I'm always wildly enthused about some of the things done for C (and early C++) compatability, but that's as much a part of C++ as are classes. --- [ 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 ] [ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ] [ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ] [ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Technical Details
Message-ID:
<4jse6k$olu@Venus.mcs.com>Path:
arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-backReferences:
<sjcDownA7.6FA@netcom.com> <4jcdp0$b3p@venus.mcs.com> <sjcDp7BEy.3J4@netcom.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-back From: maney@mcs.com (Martin J. Maney) Newsgroups: comp.std.c++ Subject: Re: delete vs incomplete class type Date: 03 Apr 96 03:06:21 GMT Organization: MCSNet Services Approved: fjh@cs.mu.oz.au Message-ID: <4jse6k$olu@Venus.mcs.com> References: <sjcDownA7.6FA@netcom.com> <4jcdp0$b3p@venus.mcs.com> <sjcDp7BEy.3J4@netcom.com> NNTP-Posting-Host: munta.cs.mu.oz.au X-Original-Date: 2 Apr 1996 17:45:24 -0600 X-Newsreader: TIN [version 1.2 PL2 (KSD)] X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUBMWHrTOEDnX0m9pzZAQEjGgF/UyjaQ4nSABKyKu3n8I1CcVoCMQK0RKVl +DM19t4iDXSloUXzaUvzwCZU6uaxKYXo =wMYs Originator: fjh@munta.cs.mu.OZ.AU