Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou Newsgroups: comp.lang.c Subject: Re: question about nullptr Date: Sat, 13 Jul 2024 04:18:06 +0200 Organization: A noiseless patient Spider Lines: 30 Message-ID: References: <20240706054641.175@kylheku.com> <877cdyuq0f.fsf@bsb.me.uk> <2ckiO.19403$7Ej.4487@fx46.iad> <87plrpt4du.fsf@bsb.me.uk> <9bCiO.7108$sXW9.3805@fx41.iad> <87jzhwu5v9.fsf@bsb.me.uk> <20240708001722.280@kylheku.com> <878qyctcdt.fsf@bsb.me.uk> <8734ojua2s.fsf@bsb.me.uk> <87sewjsdc5.fsf@bsb.me.uk> <87cynkommh.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Sat, 13 Jul 2024 04:18:07 +0200 (CEST) Injection-Info: dont-email.me; posting-host="2d519eae67512c684fdbf704ea25fb22"; logging-data="3588221"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+17QAf2gZ3DVISvBe32p/Q" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:ioRrLzZURfYPVJjjv6TfpfAkP6Y= X-Enigmail-Draft-Status: N1110 In-Reply-To: Bytes: 2899 On 12.07.2024 14:08, Janis Papanagnou wrote: > On 11.07.2024 01:25, Ben Bacarisse wrote: > [...] >> Would you welcome the introduction of the keyword unity -- with the >> value 1 and type int -- into C because one could then search for it? > > No. [...] One addition here; you've been asking for a [general available] literal name for integer constants. Which is of course nonsense because we have no "specific dedicated semantical values" (as I wrote) and which is different from 'null', 'true', or 'false', which all are such dedicated values. But for specific applications it may make sense to define (for specific values) 'int' or 'float' literals. I've seen examples of software doing formal differentiation in Algol 68 and Simula. Despite the approach of both software versions were completely different, both code designers defined dedicated objects like 'zero' and 'one', because being neutral elements these objects serve a special purpose in the software architecture of their formal differentiation algorithm. 'pi' may be another example. So even if your statement above had obviously a different more ludicrous intention [concerning a general availability of such 'int' literals] there's specific applications where it's useful (or even necessary). Janis