Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: comparison logic Date: Thu, 09 Feb 2017 12:38:39 -0800 Organization: None to speak of Lines: 41 Message-ID: References: <87vatkquaq.fsf@bsb.me.uk> <87h953osg3.fsf@bsb.me.uk> <874m12ptuv.fsf@bsb.me.uk> <34105916-ecb3-4dbd-9ad9-e70158cf8715@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="ecbc845b6da81c9d4b7b978122232250"; logging-data="25086"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ltcFfusOEYrEZ7WIONavW" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:1odjqaCqxJf0F+wEJN5AzLJaGLM= sha1:e87XOoem6wOKLh5Nh7Xbj52f7D0= Xref: csiph.com comp.lang.c:103567 supercat@casperkitty.com writes: > On Thursday, February 9, 2017 at 10:50:14 AM UTC-6, Keith Thompson wrote: >> I suggest that this kind of thing is exactly why the standard avoids >> using the word "variable". > > The Standard does not seem to have a term to refer specifically to objects > which have associated identifiers and are not contained within other > aggregates, but sometimes seems to use the term "object" for that purpose, > e.g. in N1570 6.2.4 Storage Duration of Objects repeatedly uses the phrase > "an object whose identifier is declared...", which would imply grammatically > that all objects have associated identifiers. Fortunately, that doesn't imply that all objects have associated identifiers, since that would be untrue. Something using the phrase "an object whose identifier is declared ..." simply does not apply to any object that does not have an associated identifier. Just as the phrase "a person whose middle name is Andrew" doesn't imply that all people have middle names; it simply doesn't apply either to people who don't have middle names, or to people who have a middle name other than Andrew. I suggest that the standard doesn't have a word for that concept because it doesn't need one. (I note that the C++ standard does define the word "variable". In a very quick reading, I wasn't able to determine just what its definition means.) I don't hesitate to use the word "variable" in cases where it's unambiguous. For example given int n = 42; I might refer to "the variable n" rather than using the word "object" which might be unfamiliar to a beginner. But I try to avoid the word in cases where it might be ambiguous, or where it might lead to a fruitless discussion like this one. -- 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"