Xref: utzoo comp.lang.c++:13353 comp.std.c++:904 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!olivea!mintaka!ai-lab!life!tmb From: tmb@ai.mit.edu (Thomas M. Breuel) Newsgroups: comp.lang.c++,comp.std.c++ Subject: Re: Default type of "0" Message-ID: Date: 10 May 91 01:35:35 GMT References: <74609@brunix.UUCP> <1991May7.162035.9247@odin.diku.dk> <282980FB.6AB7@tct.com> Sender: news@ai.mit.edu Organization: MIT Artificial Intelligence Lab Lines: 17 In-reply-to: chip@tct.com's message of 9 May 91 17:03:55 GMT In article <282980FB.6AB7@tct.com> chip@tct.com (Chip Salzenberg) writes: According to juul@diku.dk (Anders Juul Munch): >But I wonder, if we have > #define NULL 0 >(which is ANSI C compliant, I don't know if C++ is any different), then >f(NULL) would call f(int)?! This seems highly unreasonable to me ... That's the fact, Jack. When in doubt, cast. >looks like yet another good reason why the implicit conversion of 0 to the >null pointer should be disallowed. Too late for that; implicit conversion of 0 to a pointer isn't even a C++ invention. As an ANSI C feature, I doubt it will disappear. A possible fix to this mess might be to introduce a new value "nil" that behaves mostly like "0", but is not an integer.