Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: NULL as the empty string Date: Fri, 08 Dec 2017 17:47:48 -0800 Organization: None to speak of Lines: 27 Message-ID: References: <0f96b837-7b9a-435f-81ec-8bbc8d2f928b@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="d19aff521d1f698874161ffa83b5ceb4"; logging-data="12676"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4G6EtGgz+C82fekbSbkov" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:g666MpzDEFan3IbeIjlGGa7tDOM= sha1:ecHjMfsQxOFVXZnLdWXW0GrfjFI= Xref: csiph.com comp.lang.c:124036 jacobnavia writes: > Le 09/12/2017 à 01:05, Keith Thompson a écrit : >> Are you proposing to change the definition so that there's no >> distinction between a "string" and a "pointer to a string"? > > Of course not. That was the implication of what you wrote earlier. I'm glad to see that wasn't your intent. [...] > A string is a (maybe empty) sequence of chars finished > by zero. NULL is a representation for the empty string, as NANs are > representations for computing failure, or inf is a representation of > floating point overflow. Would it be more convenient to treat a floating-point NaN as equivalent to 0.0? Is it always better for sqrt() not to crash? [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"