Path: ...!news.nobody.at!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: Wed, 10 Jul 2024 07:36:14 -0700 Organization: A noiseless patient Spider Lines: 12 Message-ID: <86r0c18gbl.fsf@linuxsc.com> 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> <877cdwu9s1.fsf@nosuchdomain.example.com> <87y16bw1hf.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Wed, 10 Jul 2024 16:36:15 +0200 (CEST) Injection-Info: dont-email.me; posting-host="47644514c0c8b52a7b182738a8527a90"; logging-data="2055199"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Iez5I4VE+r2bMWiHUU/yKfIJzCSXbKUo=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:8IS0iiR4+mveOAy0qjUOe+GaNBs= sha1:HjXS/jX0xd69ojhiSa5isc4WXss= Bytes: 1864 Keith Thompson writes: > Hmm. I like the idea of a type-agnostic way to express a "zero" > value, [but] C's use of 0 for all scalar types strikes me more as > an historical accident than a design feature. I don't think it was an accident at all. It was chosen to be consistent with how if(), while(), !, ?:, and so forth, all act. There is a very consistent design philosophy there. Sometimes people who come from a strong Pascal background don't like it, but personally I find the C model easier and more convenient to work with than the Pascal model.