Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: question about nullptr Date: Sat, 06 Jul 2024 20:06:49 -0700 Organization: A noiseless patient Spider Lines: 21 Message-ID: <86ikxhc33q.fsf@linuxsc.com> References: <20240706054641.175@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sun, 07 Jul 2024 05:06:50 +0200 (CEST) Injection-Info: dont-email.me; posting-host="940a3321ebe7e91666808b6f59645346"; logging-data="199703"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/0eJnQTJEJHAuSonI9kDx0E1FG47++6TY=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:08EU/5m27hA1vdEOIkENl+l9L68= sha1:1iCelPGB2VTiDiQ/fRVgKujKgQ8= Bytes: 1823 scott@slp53.sl.home (Scott Lurndal) writes: > Andrey Tarasevich writes: > >> On 07/06/24 7:04 AM, Scott Lurndal wrote: >> >>> Whereas I spent 6 years programming on an architecture[*] where a >>> null pointer was represented in hardware by the value 0xc0eeeeee. I always >>> use the NULL macro in both C and C++ code. >> >> But that achieved absolutely nothing over using plain `0` in the source >> code. >> >> The `NULL` you used was still defined as `0` (in C++ libs) and 0 or >> `(void *) 0` (in C libs). > > Which ambiguity is yet another reason to use the NULL or nullptr > tokens. The definition of NULL is ambiguous and that is a reason in /favor/ of using NULL? Not to me it isn't.