Topic: Re; Dynamic_cast of 0
Author: Mike Schilling <mikes@forte.com>
Date: 1999/01/12 Raw View
David R Tribble wrote:
>
> David R Tribble wrote:
> The 'null' keyword would
> be valid as a pointer operand (convertible to any pointer type) in
> expressions like these:
>
> ...
>
> printf("%p", null); // Passed as void *
No, no, no, no, no, no, no.
The main point of a null keyword, to me, is to avoid silently brasking type
correctness. This should be a compilation error: "null" used in a context
where its type cannot be determined. If you mean (void *)null, and not
(int *)null or ((void *)())null, say so.
-------------------------------------------------------------------------
Mike Schilling (mikes@forte.com) (510)869-3474
Forte Software, Inc.
I think I'm sophisticated
Cause I'm living my life
Just like a good homo sapiens
---
[ 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 ]