Path: utzoo!attcan!uunet!kim From: kim@kim.misemi (Kim Letkeman) Newsgroups: comp.lang.c Subject: Re: Abandon NULL for (0) Message-ID: <1005@kim.misemi> Date: 23 Sep 89 14:55:58 GMT References: <6502@ux.cs.man.ac.uk> <14718@bfmny0.UU.NET> <146@bbxsda.UUCP> <17505@pasteur.Berkeley.EDU> <14678@haddock.ima.isc.com> Organization: MITEL Corporation, Kanata, Ontario, Canada. Lines: 20 In-reply-to: karl@haddock.ima.isc.com's message of 22 Sep 89 15:42:26 GMT In article <14678@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: >Despite which, there *are* good reasons for not doing it. >The word "NULL" has been conventionally used for decades >[...] >In particular, if I were maintaining that code, I'd change the "(0)"'s >back to "NULL"'s as fast as I found them. >[...] Finally, someone has addressed the most important issue with that posting ... the fact that using "(0)" instead of "NULL" makes the program harder to read and maintain. There are enough brackets (and braces and ellipses) in the average program without adding more as a superfluous replacement for a good convention. 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.) -- Kim Letkeman uunet!mitel!spock!kim