Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!usc!bloom-beacon!eru!luth!sunic!mcsun!ukc!stc!datlog!scm From: scm@datlog.co.uk ( Steve Mawer ) Newsgroups: comp.lang.c Subject: Re: Abandon NULL for (0) Message-ID: <2237@dlvax2.datlog.co.uk> Date: 3 Oct 89 12:19:35 GMT References: <6502@ux.cs.man.ac.uk> <14718@bfmny0.UU.NET> <146@bbxsda.UUCP> <17505@pasteur.Berkeley.EDU> <14678@haddock.ima.isc.com> <1005@kim.misemi> Reply-To: scm@datlog.co.uk ( Steve Mawer ) Organization: Data Logic Ltd, Queens House, Greenhill Way, Harrow, London. Lines: 16 In article <1005@kim.misemi> kim@kim.misemi (Kim Letkeman) writes: > [stuff about using "(0)" instead of "NULL" making programs harder to > read and maintain] > I also did not like the >original author's tendency to write the NULL first in a comparison >(e.g. if (NULL == some_ptr)) because this obscures the fact that the >pointer is the object of interest. The value for which you are >comparing is secondary (although important.) I also find this comparison ordering unpleasant, but (silver lining!) it is a convenient way of finding those irritating moments when you've mistyped "==" as "=". -- Steve C. Maweror < {backbone}!ukc!datlog!scm > Voice: +44 1 863 0383 (x2153)