Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: why the ! operator can be used to determine a string is null? Date: Thu, 10 Aug 2017 03:20:38 +0100 Organization: A noiseless patient Spider Lines: 45 Message-ID: <871sokduyx.fsf@bsb.me.uk> References: <87zib8g4eb.fsf@bsb.me.uk> <10915888.O9o76ZdvQC@PointedEars.de> <877eycdzm9.fsf@bsb.me.uk> <2062468.ElGaqSPkdT@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="095bb2b259dd0e10cf340db4dcb09e7e"; logging-data="9270"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+B+ebzo/IFxjIP0OrfzOzGdj8FFw5OS8I=" Cancel-Lock: sha1:2TFSdxVYFGJjpw1mMn6yTbL7eO0= sha1:tLe8CzYpd/2e0Xeu4nYCH2xcNio= X-BSB-Auth: 1.66d54fa360b1aa5cccab.20170810032038BST.871sokduyx.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:33749 Thomas 'PointedEars' Lahn writes: > Ben Bacarisse wrote: > >> Thomas 'PointedEars' Lahn writes: >>> Ben Bacarisse wrote: >> >>>> Further complicated by the fact that there is a character called null >>>> (sometimes Null, Nul or NULL) so a string can "be null" in that it >>>> contains just that character. >>> As we are talking about ECMAScript, it is the Unicode character U+0000 >>> NULL (to my surprise, not “NUL” as in US-ASCII) whose standard >>> representation is a boxed “NUL” (AFAIK, it is *never* called “null”, >>> “Null” or “Nul”): >> >> If you can find an original copy of the standard you'll see a table of >> control characters that gives "Abbreviations" (though most are acronyms) >> and, as you say, NUL is the abbreviation for the first one. After that >> table is an explanation that gives the name as "Null" and the >> abbreviation as "Nul" (for some reason not in caps). > > *I have just cited* “an original copy of the standard”, so please cite > evidence supporting your claims. X3.4-1967 "The American Standard for Information Interchange". You may have to go to a physical library to find it. I can cite an online scan of an article from the November 1967 Western Union Technical Review explaining this new code, but obviously you will need to see the original. >> Since it's not a proper name, people write "null" for it just as they > ^^^^^^^^^^^^ >> write "bell" for the character abbreviated as in the table as BEL. > > Weasel wording. People who do not know what they are talking about are > irrelevant when one is faced with deciding the correctness of an answer > to a question. The issue is what people write and the confusion it causes. At no point have I said any of this is or is not "correct". The meaning of the phrase "null string" is confused precisely by people using words incorrectly or, at best, ambiguously. -- Ben.