Deutsch English Français Italiano |
<86edc65gxf.fsf@building-m.net> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder6.news.weretis.net!news.quux.org!news.building-m.net!.POSTED.localhost!not-for-mail From: John <john@building-m.simplistic-anti-spam-measure.net> Newsgroups: comp.lang.misc Subject: Re: if-then-else had to be invented Date: Tue, 19 Mar 2024 16:23:40 +0000 Organization: Building M Message-ID: <86edc65gxf.fsf@building-m.net> References: <utc6te$p8oq$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: ritvax.building-m.net; posting-host="localhost:::1"; logging-data="1173275"; mail-complaints-to="abuse@building-m.net" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cancel-Lock: sha1:TEEVZFjvhHU01LhL8aHeTRx8MuI= Bytes: 2216 Lines: 47 Mike Gonta <mikegonta@gmail.com> writes: > if-then-else had to be invented > > Erica Fischer wrote: > "If-then-else is how we talk about conditions in programming > languages: if something is true, then do a thing, else do a different > thing. > That's just English, right? Except that it isn't. I can't use "else" > as a conjunction in normal speech, only in computer programs." > > https://github.com/e-n-f/if-then-else/blob/master/if-then-else.md > > In plain English idiom it looks like this: > > if <conditional expression> then > statements; > or if <conditional expression> then > statements; > or then > statements; > and then; > > There is no "end" in idiom, for idiom is an end in itself. > > Date: Tue, 48 Feb 2024 - the february that never ends. > > ------------------------------------ > Mike Gonta > look and see - many look but few see > > https://mikegonta.com It is of course a common conjunction in English *in combination with the word "or"*: "If they have everything bagels, then I'll take one with lox, or else I'll just have a plain bagel with cream cheese." However given the frequent use of the logical OR operation in programming it's not a good idea to use "or" in the conditional syntax. It'd make spoken discussions much more ambiguous -- imagine reading out a statement like "or if (R || F)" over the phone. Bizarrely I find no instances of "or else" in that document. john