Path: utzoo!mnetor!uunet!mcvax!ukc!its63b!aiva!richard From: richard@aiva.ed.ac.uk (Richard Tobin) Newsgroups: comp.lang.c Subject: Re: The D Programming Language Message-ID: <264@aiva.ed.ac.uk> Date: 25 Feb 88 17:43:09 GMT References: <11702@brl-adm.ARPA> <243@eagle_snax.UUCP> <2245@geac.UUCP> <2327@umd5.umd.edu> <915@PT.CS.CMU.EDU> Reply-To: richard@uk.ac.ed.aiva (Richard Tobin) Organization: Bannerman's Bar, Cowgate, Edinburgh Lines: 23 In article <915@PT.CS.CMU.EDU> edw@IUS1.CS.CMU.EDU (Eddie Wyatt) writes: >> >I think I would also drop the convention that 0 is a null pointer. Make >> >"null" a keyword, representing a null pointer of any type. >> This would, at one stroke, eliminate half the confusion that plagues >> comp.lang.c .... (about 1/3 :-) ) > Unless you require function prototypes to be within scope, null >will not do you much good. Ah, but if you you don't make the representation of the null pointer be the same as that of an integer (or anything else) then you can make it illegal to pass it (uncast) to a function for which there is no prototype. You can't do that with zero, unless you want to have to say (int)0 to pass an integer zero. Of course, when designing a new language you certainly could require that functions never be used unless there is a prototype (or "declaration" as one might call it) in scope. -- Richard -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nss.cs.ucl.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin