Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: What is the data structure of a NULL? Date: Sun, 29 Dec 2019 22:46:48 -0800 Organization: None to speak of Lines: 36 Message-ID: <87r20mpaxz.fsf@nosuchdomain.example.com> References: <87sgl4rc3w.fsf@nosuchdomain.example.com> <87o8vsqh5l.fsf@nosuchdomain.example.com> <87k16fr9za.fsf@nosuchdomain.example.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="0288a230ee44bf2819ced9a20d12e663"; logging-data="30028"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/62cTbckniwRLAfEFpGUhb" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cancel-Lock: sha1:RevFGB28RNWy80b4rr6u4ctPmqA= sha1:AXt/qtYr23nZg+Kca4hv5GW5H/k= Xref: csiph.com comp.lang.c++:70801 Ned Latham writes: > James Kuyper wrote: >> Ned Latham wrote: >> > Keith Thompson wrote: >> > > >> > > You indicated that it's useful to know how a null pointer is >> > > represented. How is it useful? Most of the time, the representation >> > > doesn't matter. >> > >> > Knowing it's useful in that it enables me to use it. >> >> Can you give an example of code involving a null pointer that you could >> not have used if you had not known how null pointers are represented? I >> write code that deals correctly with null pointers all the time, and to >> the best of my knowledge, not a single line of code I've ever written >> would need a re-write if ported to a system which uses a different >> representation for null pointers. > > http://www.users.on.net/~nedlatham/Software/mclib/Documents/sourcecode.html > > Check AVLC and ListC, also read > http://www.users.on.net/~nedlatham/Software/mclib/Documents/mclists.html Can you give a *succinct* example? I'm not going to spend the time it would take to read that. Of course you *can* write code that depends on the representation of a null pointer, but there is rarely a good reason to do so. [...] -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com [Note updated email address] Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */