chrismorgan 2 hours ago

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.)

crooked-v 2 hours ago

I would expect there''s plenty of pre-computer media with phrasing along the lines of "Do/don't do X, or else Y will happen."

flohofwoe an hour ago

The most likely German candidate would be 'sonst', which would be both in common use and short enough for a programming language keyword. E.g. the most likely option for 'if-then-else' is 'wenn-dann-sonst', assuming that German-origin theory is right of course.

One thing that's mostly forgotten today is that German had a very rich 'corpus' of wonderful nerdy computer science words up until the 1990s which unfortunately has fallen out of fashion. Nowadays it's a pretty terrible 'pidgin dialect' when Germans talk about programming and computers to each other (to a point where it's much less awkward to just speak English in the first place lol).

wjnc an hour ago

As a non-native speaker of both English and German, I feel a little difference in usage. I liked this bit of slop:

‘The most significant nuanced departure is that "sonst" can mean "normally," "usually," or "in general," contrasting a specific event against a baseline of normality. "Else" cannot do this.’

There is an etymological root to ‘sonst’ that is also the root of English ‘thus’. The German explanation would fit well in this story (but indeed no evidence presented).

flohofwoe an hour ago

Hmm, to me as native speaker, 'sonst' has pretty much only one meaning which is pretty much exactly 'or else'. There's a longer and 'more archaic' version 'ansonsten'.

wjnc an hour ago

Forgive me for trying it out on you:

“Er trinkt heute Kaffee, sonst trinkt er nur Tee.”

flohofwoe 43 minutes ago

It's often used for more immediate 'consequences', like "Ich muß los, sonst verpass ich meinen Zug" (I need to leave, otherwise I'll miss my train).

weinzierl an hour ago

Not sure what the original German version was, but

falls-dann-sonst

would be more correct, since "wenn" is temporal, like the English "when".

Many Germans often use these wrongly in everyday speech, but mathematicians like Friedrich L. Bauer probably wouldn't.

flohofwoe an hour ago

Yeah, but "wenn-dann-sonst" rolls better off the tongue ;)

manuel-rhdt an hour ago

As a German, my experience is that the typical use of "wenn" is more often synonymous to the English "if", rather than the English "when". The meaning of "wenn" is contextual. Using "wenn" to for conditionals is not a mistake of everyday speech but rather a feature of the language.

The other German word "falls" is sometimes also translated as "if" but it carries a slightly different connotation. In typical use "falls" is used for an unlikely condition: "falls es morgen regnen sollte" -> "if it were to rain tomorrow". If "wenn" was used instead of "falls", the connotation would be more like a 50/50 probability. In the end, the if/when split of English is really not the same as the falls/wenn split of German. For computer programming "wenn" would likely have been preferred by German programmers.

stavros 32 minutes ago

I always understood "falls" as "in case" (as in, preparing for a slightly unlikely outcome), but my German is weak.

b3orn 44 minutes ago

> since "wenn" is temporal, like the English "when".

Nope, "wenn" is both "if" and "when", it's not limited to time.

cyxxon 44 minutes ago

Nitpick: "wenn" is both temporal and conditional, whereas "falls" is only conditional, therefore it is considered good style to use "falls" if you want to make totally clear what you mean. It is, however, perfectly fine to use "wenn" for a konditionalen Nebensatz.

secretsatan an hour ago

I worked on a GIS system in a german speaking company, it was very confusing, it was mostly programmed in english, apart from the things we we’re modelling, which had extremely specific and often long german names.

gavmor an hour ago

I can't think of anything else.

slu 3 hours ago

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...

emayljames 3 hours ago

I don't know if the article writer is north American, or possibly not familiar with traditional/native English, else they would know they are completely wrong it not being English.

eesmith 2 hours ago

The author didn't say it was not English.

The author wrote: "I can't use "else" as a conjunction in normal speech, only in computer programs."

No doubt people use 'else' as a conjunction now, due to the influence of programming.

To show the author is completely wrong requires finding pre-1959 uses of 'else' in a conjunction.

sherr 3 hours ago

Also in the English speaking world, but getting rare: Elsie.

vintermann 2 hours ago

I think most Elsies were originally Else, or had a mother or grandmother named it. In Germanic languages the final E is not silent as in English, so you have to spell it Elsie for English people to pronounce it approximately right when they read it off the page.

hbcdbff 11 minutes ago

Elsie would be a completely wrong way of transcribing Else in most Germanic language.

Elsa would be closer.

Or “Elseh”.

GiveOver an hour ago

It's in the top 10 baby names in the UK

riggsdk an hour ago

Other Danish'ness:

You'd translate the "else" keyword to "ellers". "if then else" => "hvis så ellers"

Related, the word "or" would be translated to "eller" (without the 's') "and or not" => "og eller ikke"

internet_points 33 minutes ago

Men with the first name 'Odd' 72

Men with the first name 'Even' 73

Men and women with the last name 'Even' 11

rzzzt 2 hours ago

British PHP uses 'perchance ... otherwise':

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

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

magnat 2 hours ago

It was this comment what made me realize #:~:text= in the URL isn't some custom, per-site JS hack or a weird way to name your anchors, but actual standard[0] way to link to a text on any page.

[0] https://developer.mozilla.org/en-US/docs/Web/URI/Reference/F...

rzzzt an hour ago

Chrome and derivatives have a "Copy link to highlight" context menu, which also adds some text surrounding the highlight, but I removed that since it only has a single occurrence.

n_plus_1_acc 42 minutes ago

Newer firefoxes have that too

esperent 3 hours ago

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.

isaacfrond 3 hours ago

It is nor far-fetched to suppose else is a translated German word because that is exactly what happened. The only question is which German word was is it.

hobo123 3 hours ago

The only German that makes sense would be

wenn ... dann ... sonst

emayljames 3 hours ago

I don't know if the article writer is north American, or possibly not familiar with traditional/native English, else they would know they are completely wrong it not being English.

esperent 2 hours ago

> because that is exactly what happened.

No, it's what the author claims to have happened. I am strongly disputing their thesis as spurious.

mike_hearn 28 minutes ago

The document in question specifically says it is a rushed translation of a German document, what's in dispute here exactly?

vintermann 2 hours ago

There were plenty of long English keywords in early computing: continue, dimension, equivalence, frequency, procedure etc. It seems it was mostly the Lisp folks who strictly shunned long keywords.

divbzero 5 hours ago

‘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.

isityettime 4 hours ago

You can also say "elsewise", which to me still sounds a little old school, but more natural than just using "else" like we do in programming languages.

It's almost tempting to reach for "elsewhen" or "elsewhy", since we have "elsewhere". But if saying "elsewise" feels like chatting with a very elderly relative, saying those ones feels more like a seance with distant ancestors. But apparently it used to be a thing!

https://en.wiktionary.org/wiki/elsewho#English

https://en.wiktionary.org/wiki/elsewhither#English

https://en.wiktionary.org/wiki/elsewhence#English

https://en.wiktionary.org/wiki/elsehow#English

https://en.wiktionary.org/wiki/elsewards#English

https://en.wiktionary.org/wiki/elsewhat#English

https://en.wiktionary.org/wiki/otherwhat#English

TulliusCicero 4 hours ago

Except for the phrase "or else!"

mapontosevenths 3 hours ago

I came here to say this.

I my head as a child I instantly understood and thought "Ahhh, they mean like 'OR else this happens.'

I have always assumed it was a boolean logic thing meant to help show that it wasn't an AND, but 'or' had already been used as a keyword so they did 'or else' and dropped the reserved 'or'.

zarzavat 3 hours ago

Else doesn't sound archaic to my ears.

"When you go shopping make sure to buy flour or else we won't be able to bake the cake"

"otherwise" is a more common word choice but "else" is definitely in the active vocabulary of modern English speakers.

jolmg 3 hours ago

"or else" is redundant. One can omit one word or the other and it still works.

> When you go shopping make sure to buy flour, or we won't be able to bake the cake.

> When you go shopping make sure to buy flour, else we won't be able to bake the cake.

EDIT: TIL: Dictionaries don't commonly define "else" as a conjunction, except for Wiktionary. Still sounds natural to my ears, so this is a surprise.

chrismorgan 3 hours ago

That’s “or else”. Bare else is no longer common.

shawabawa3 an hour ago

Someone else might disagree with that

secretsatan an hour ago

It’s often used as a threat, without specifying the threat, do this, or else!

Braxton1980 an hour ago

"...or else you'll..."

IanCal an hour ago

> Else’ is not commonly used in English today

I feel like I’m going crazy reading this thread today. Else is not a rare or archaic word.

stavros 30 minutes ago

"Else" is definitely extremely commonly used in English today, just not in the US. The UK says "else" instead of otherwise. "We'll see if the bar is open, else we can go across the street".

parasec 40 minutes ago

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.

akersten 6 hours ago

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

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

RachelF 5 hours ago

someone else ;-)

wvenable 5 hours ago

Hurry up, else we'll be late. You'd better leave now, else you'll miss the bus. Do what I say, else there'll be trouble.

tetha 3 hours ago

If the addressed person does not comply, you can also add "or else" in a threatening tone.

Such a funny movie.

stavros 23 minutes ago

That is exactly the correct UK usage.

mondobe 4 hours ago

Perhaps after the robot uprising... https://www.smbc-comics.com/comic/the-program

emayljames 3 hours ago

Else could I?..

stkdump 5 hours ago

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

divbzero 5 hours ago

Yes, otherwise is more natural but less terse.

autoexec 4 hours ago

"or else" works too but that's still three extra characters

jordigh 4 hours ago

We often write "otherwise" in mathematics:

https://arxiv.org/html/1501.05438v2#:~:text=otherwise,-%2C

https://arxiv.org/html/1302.5008v3#:~:text=otherwise

https://arxiv.org/html/1501.05438v2#:~:text=otherwise,-%2E

In fact, I think that's the most common alternative, not "else".

alexfortin 4 hours ago

I'm writing some Crystal (which has Ruby-like syntax) and I'd add `unless` to the list. I like it!

egeozcan 4 hours ago

"Unless" feels like adding come-from (next to goto) to a language. A statement/flow should not change its meaning after being declared/written IMHO.

edit: My criticism is for the suffix version to be clear. Unless / else is actually cool.

NooneAtAll5 3 hours ago

wdym? "unless" is literally "while not", no come-from mechanics

amszmidt 3 hours ago

“unless” is “if not” — it is not generally looping construct.

jibalt 3 hours ago

`destroy_world() if $angry;` is Perl syntax. And Python has `destroy_word() if angry else live_long_and_prosper()`.

(But it's not remotely like come-from.)

P.S. in re the other response, "unless" is "if not". "until" is "while not".

jibalt 3 hours ago

`unless` came from Perl, Ruby adopted it, and so of course did Crystal.

amszmidt 3 hours ago

”unless” already existed in early Lisps in the 1970s…

justinator 4 hours ago

"loop" can all be typed with one finger, as the letters are all together on the qwerty keyboard, and the "o" repeats itself.

"while" on qwerty is sort of a chore.

stkdump 4 hours ago

Using more fingers allows for faster typing.

Cordiali 2 hours ago

There's a joke in here somewhere about machinists.

opan 4 hours ago

Usually for speed and avoiding strain you want to incorporate as many fingers as possible. In fact it's a common mark against dvorak online that "ls -l" is all typed with the right pinky (not an issue in the workman layout luckily).

fy20 3 hours ago

Also remember this was typed with typewriters. That gives its own set of constraints. It's quicker to type two different characters than the same character twice in a row, as you need to wait for the typebar to return enough.

opan an hour ago

This is a good visual to understand it intuitively but your finger itself has a similar issue. In rhythm games like Taiko no Tatsujin and Muse Dash you only have two distinct notes/lanes but you typically play with 4 (or more) keys. A group of 3 red notes in Taiko is way easier to play by alternating hands back and forth than by spamming one key as fast as you can with the same finger. This somewhat applies to Rock Band as well with alternating strumming being useful for long stretches of notes close together, but a lot of people just brute force their way past that without learning alt strumming. For Taiko I think the alternating is much more important and you won't last without learning it.

jibalt 3 hours ago

w TAB in a properly configured emacs

justinator 2 hours ago

Correct me if I'm wrong– I haven't check on THAT corpse– but couldn't you configure w TAB to be a shortcut for whatever you want (or make your own?).

jolmg 3 hours ago

When you can touch-type, it's better to have keys spread to use separate fingers. That way, you divide up the work. You have one finger still lifting while the other's already starting the next press.

justinator 2 hours ago

Try it. What's faster to type: one word with a total of 5 distinct letters, or one word with a total of 4 letters, three being distinct?

I understand the theory when writing, you know: sentences. Writing code ain't that. I'm also not typing on a model M. This laptop's keys press down like 1 or 2mm at most. You actually only need to press down twice -- just move your finger from "l" to the "o" depress/press again for another "o" and move right over to the "p".

Do you reprogram your keyboard so parentheses, square/angle brackets, etc can be typed with their respective hands? Naw. When people type numbers all day, are they delighted to use the row of numbers up top, or a numpad? Never have I ever.

jolmg an hour ago

I use one finger when typing "loop", because it doesn't make sense to do otherwise given how the respective keys are on QWERTY. That just means the word "loop" sucks.

Regarding parentheses/brackets, I said "separate fingers", not "separate hands". I do use separate fingers for parentheses/brackets.

The numpad is a weird thing. When I've (rarely) needed it for sustained number capturing, I do typically stick to one finger because it's easy to get lost with multiple. Not sure why. It could just be lack of practice with the numpad.

lazyasciiart 4 hours ago

This guy better figure out how to use English, or else something bad will happen.

zacharyvoase 5 hours ago

it was probably a rote translation of the German word ‘sonst’

ashton314 4 hours ago

Das denke ich auch.

I found it strange (merkwürdig) that they didn’t mention this in the article.

tacker2000 3 hours ago

Yes something like wenn…dann…sonst?

I remember I heard this structure at Uni at some point.

jibalt 3 hours ago

I think the headline is nonsense.

I was going to mention the MAD language by Bernard Galler et. al. that used whenever/otherwise, which I encountered in a book in the local library back in the days when everyone was coming up with "structured" programming languages, but then I scrolled to the bottom of the article ...

dvh an hour ago

How would you mime "else" in charades?

stavros 20 minutes ago

Every single comment I've seen here seems to miss that, in the UK, "else" is the preferred word to use in these contexts.

"We'd better hurry, else we'll be late", or "I could go to a pub, else we can just stay home" is exactly the correct UK usage.

I guess the UK largely isn't up yet, hence this sort of comment missing.

pram 5 hours ago

Don’t even get me started on “elif”

tomrod 4 hours ago

I like elif. It means exactly what I want it to mean!

lioeters 3 hours ago

I also like iff and ffs.

ButlerianJihad 25 minutes ago

My first CSE class in college was two quarters long and self-paced. We could use the lab all we wanted. I somehow found out the logic and meaning of the term "iff" and so I found a way to appropriately use it in an answer to a quiz. I scored a bonus point, as the TA was impressed. She circled it and made a encouraging comment. I was so pleased to be an apt pupil in that class.

YeahThisIsMe 4 hours ago

That's a perfectly cromulent Turkish name.

deepsun 4 hours ago

I remember it felt odd when XSLT code provided "otherwise" instead of "else".

rickdeckard 3 hours ago

Nice article.

Funny enough, even though I know if/then/else by heart for decades now, I also spent a few seconds comprehending that 1960 arrow diagram of ALGOL60...

bitwize 5 hours ago

No. English has used else to mean "otherwise" since before computers came along. Wiktionary offers this quote from Call of the Wild (1903):

"He had never seen dogs fight as these wolfish creatures fought, and his first experience taught him an unforgetable lesson. It is true, it was a vicarious experience, else he would not have lived to profit by it."

https://en.wiktionary.org/wiki/else#Conjunction

There's also "or else", as made famous in crime dramas: "Meet me by the docks at midnight. Bring the money. Come alone. No cops... or else!" But in other usage it can of course be followed by something. "He had to get to work on time, or else he might be fired."

krautsauer 4 hours ago

"or else" is right in the second image, and it's clearly not "else".

Even if it hasn't been invented as the author claims, the question of who used it in code first is a valid one, right?

fcarraldo 5 hours ago

If something were to be true, then foo.

Or if this other thing were to be true, then bar.

If it’s something else, then baz.

hekkle 4 hours ago

OR if is ambiguous, and wouldn't work like an 'else if' statement. I think you mean XOR.

dwd 3 hours ago

What about Kierkegaard?

He wrote Either/Or or Enten – Eller in Danish in 1843.

Else in Danish is Ellers.

emayljames 3 hours ago

I don't know if the article writer is north American, or possibly not familiar with traditional/native English, else they would know they are completely wrong it not being English.

andai 4 hours ago

Some languages also have an "unless" keyword!

duskwuff 4 hours ago

Perl also has "until" as the inverse of "while".

(It'll also let you use "unless ... else ..." - but please don't.)

jibalt 3 hours ago

But elsif

saintfire 5 hours ago

Article states else is archiac English but later says someone called it ignorantly incorrect English and suggested using "or".

Ive always assumed it was effectively "otherwise" but shortened to "or else" -> "else".

Given the alternative to use "or" as the first pushback I feel that acts as confirmation. I prefer else because "or" has implications in boolean and bitwise logic that else doesn't.

raverbashing 2 hours ago

Also, one thing that has been happening without much awareness in the history of computer languages: shorter identifiers win over long identifiers

Why not { } instead of begin and end?

def or fn over function/lambda (or just () => now)

Symbols are confusing at first but become practical after a bit

About TFA: Also 'if/or' would make people confuse logical or with bitwise or, so I guess that's why it was eschewed

wewewedxfgdf 6 hours ago

The English language origin is from programming if/then/else

dboreham 5 hours ago

Very not true.

rapidaneurism 4 hours ago

What if time travel was involved?

Frieren 5 hours ago

If ... then ... otherwise ...

Fixed!

hcs 5 hours ago

if ... then ... neht ... fi

baggy_trough 4 hours ago

Give up this mad idea, or else.