The 'else' keyword probably came from a hasty German-to-English translation

The 'else' keyword is probably a literal translation from German (2020)

The 'else' keyword probably came from a hasty German-to-English translation

Eric Fischer traces the origin of 'else' in programming to a 1958 German proposal for Algol. The German authors introduced 'else' for a case-like conditional, and their document was hastily translated into English. Klaus Samelson later adapted it into the if-then-else form we use today. The original German text is lost, so the exact word choice remains a mystery.

I think a carefully-chosen German word was probably translated as an archaic English word and then never revisited.
  1. chrismorgan

    The submitted title

    > The 'else' keyword is probably a literal translation from German (2020)

    is editorialised, inaccurate, and very misleading.

    The actual title: “if … then … else had to be invented!”

    And the content doesn’t say anything about it being a literal translation from German; rather:

    > What they do say is that this document was originally written in German and hastily translated into English. I think a carefully-chosen German word was probably translated as an archaic English word and then never revisited.

    Wild speculation, and definitely nothing about literality of translation.

    As for the author’s description of it being archaic, well, I’d call that misleading too. Bare “else”, arguably (definitely not colloquial in most dialects), but as “or else”, perfectly current.

    Seems perfectly reasonable to me that someone considered the options, decided “otherwise”, “or else” too wordy and confusing in its own way, and so settled on bare “else” as the best choice (which I think it is), not how people mostly speak, but perfectly legitimate, and concise.

    (In other words: I think we’d have settled on “else” even without the possible German step. This too is speculation, of course.)

  2. slu

    Else is a given name in Denmark (a variation of Elsa, I'm guessing). At university we had a professor with the surname True; so if he had a daughter, her name could've been Else True. We found that quite funny.

    Else If would also be a possible name in Denmark.

    But, according to Statistics Denmark[1], none of those combinations exists:

    Women with the first name 'Else' 13,047

    Men and women with the last name 'True' 166

    No one has the name 'Else True'

    Women with the first name 'Else' 13,047

    Men and women with the last name 'If' 6

    No one has the name 'Else If'

    [1] https://www.dst.dk/en/Statistik/emner/borgere/navne/hvor-man...

  3. rzzzt

    British PHP uses 'perchance ... otherwise':

    - https://aloneonahill.com/blog/if-php-were-british/#:~:text=E...

    - https://news.ycombinator.com/item?id=33828509

  4. esperent

    It's always "or else" when used as a conjunction in modern English.

    "Take your coat or else you'll regret it."

    "Hurry or else you'll miss the bus."

    Etc.

    > if something is true, then do a thing, else do a different thing.

    > That's just English, right? Except that it isn't

    No, it is English, grammatically correct English. It's not idiomatic English but it's a perfectly fine sentence otherwise.

    Idiomatic English would simply require adding an or

    if(x)

    do m

    orelseif(y)

    do n

    orelse

    do o

    But of course a native English programmer would quickly recognize the or is redundant even if it is idiomatic, and drop it.

    > I think a carefully-chosen German word was probably translated as an archaic English word and then never revisited

    This is a weird reach. Else isn't an archaic word.

    "Eat your dinner or else."

    "If you don't do it someone else will have to."

    Plus all the "or else" conjunction examples.

    It was probably chosen because it was shorter than "otherwise" and not for any other reason.

  5. parasec

    wild speculation indeed. According to Google Book Ngrams, the word "else" has been used in english books as far back as the tool permits (1500s) and can be found everywhere - from books to state calendars.

  6. divbzero

    ‘Else’ is not commonly used in English today but the meaning does fit. From Webster’s (1913):

    Else, adverb or conjunction

    1. Besides; except that mentioned; in addition; as, nowhere else; no one else.

    2.

    Otherwise; in the other, or the contrary, case; if the facts were different.

    “For thou desirest not sacrifice; else would I give it.” – Ps. li. 16.

    After ‘or’, else is sometimes used expletively, as simply noting an alternative. “Will you give thanks, … or else shall I?” – Shak.

  7. akersten

    > I can't use "else" as a conjunction in normal speech, only in computer programs.

    sure you can. who's going to stop you?

  8. stkdump

    The modern universal keywords if, else, for and while are good because they are fairly short and thus quick to type.

More from this day

2026-10-29