• Re: if-then-else had to be invented

    From John@21:1/5 to Mike Gonta on Tue Mar 19 16:23:40 2024
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)