sure you can. who's going to stop you?
Such a funny movie.
"Someone else" sounds correct but else isn't trying to act as a conjunction there.
Scots (the Scots language, not Scottish English) tends to use bare "else" wherever "otherwise" is used in English, so I assume it's coming from the Northumbrian dialect of Middle English and leaks through to those dialects of Modern English with more Northumbrian influence.
Fixed!
Or if this other thing were to be true, then bar.
If it’s something else, then baz.
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".
I found it strange (merkwürdig) that they didn’t mention this in the article.
I remember I heard this structure at Uni at some point.
Not true. Here's an example from 1876 in which "else" is used as a conjunction.
> My brother is poor, and I want to look as much like him as I can, else he may feel distant from me.
-- George Eliot ( https://www.victorianlondon.org/etexts/eliot/deronda-0047.sh... )
---
Here's an example of "if ... else" from the 1914 translation of Crime and Punishment ( https://en.wikisource.org/wiki/Crime_and_Punishment/Part_IV/... ):
> Perhaps it will all come back, but now if you love me, give me up . . . else I shall begin to hate you, I feel it.
It’s not being used in the programming if-else sense here. He’s not saying “if you don’t love me, I shall begin to hate you”. He’s saying “if you don’t give me up, I shall begin to hate you”.
give me up
else: I shall begin to hate you
# i feel itIve 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.
"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."
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?
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.
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
While the look up for history of computer language is interesting, the conclusion is completely wrong.
The HN title reads "literal translation," which I didn't take to mean "literally".
The linked article doesn't really have a title. The article author states [...] "I think a carefully-chosen German word was probably translated as an archaic English word and then never revisited. Unfortunately we do not have the original German text to consult."
(It'll also let you use "unless ... else ..." - but please don't.)
"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.
wenn ... dann ... sonst
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 ...
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...
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.
Google ngrams shows 'else' being used fairly consistently up until about 1880 after which it gradually declines. In the 2000s it rapidly picks up, probably because of the programming influence.
Looking at the actual texts, there are a few German ones listed. Plenty with "someone else", "nothing else". Quite a lot with "or else", for example: "Yea , but what am I ? a scholar, or a schoolmaster, or else some youth".
He wrote Either/Or or Enten – Eller in Danish in 1843.
Else in Danish is Ellers.
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...
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
> 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.)
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).
- https://aloneonahill.com/blog/if-php-were-british/#:~:text=E...
[0] https://developer.mozilla.org/en-US/docs/Web/URI/Reference/F...
PHP stands for Perchance Half-witted Politeness
"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.
If-then-else had to be invented - https://news.ycombinator.com/item?id=28489930 - Sept 2021 (18 comments)
If-then-else had to be invented - https://news.ycombinator.com/item?id=25406211 - Dec 2020 (248 comments)
english inherited this from latin
something else → etwas anderes
edit: My criticism is for the suffix version to be clear. Unless / else is actually cool.
(But it's not remotely like come-from.)
P.S. in re the other response, "unless" is "if not". "until" is "while not".
"while" on qwerty is sort of a chore.
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.
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.
It's hard to be sure, because I'm not sure how much I bias my movements by trying to monitor them while I do it! Normally I just type on auto-pilot, looking at the screen and not really being aware of the specific movements or finger duties...
I have a very idiosyncratic touch-typing method. I am self-taught with 40+ years of computer usage since grade school. There are arcing zones that are in the natural reach of different fingers, but with overlap where adjacent fingers can reach the same keys. I think my middle fingers are somewhat dominant, and may do more than their share of the total keypresses because of their dexterity and reach.
I have relatively large and flexible hands, so I span the keyboard by bending and reaching fingers rather than moving my forearms. The outer heel of my hands are statically parked on the palm rest or desk, and just the small joints in my hands and fingers are moving.
This parked posture is probably why I strongly prefer the Thinkpad "trackpoint" input device for general computer use.
Short words mattered in the early days, with punch cards, very limited memory and computing power, shorter words saved resources. Also, when running a program means handing a stack of punch cards to an operator and waiting for the result to come out the next day, saving a few seconds of typing probably wasn't a priority.
As computer got fast enough not to care about single bytes, there was a push against using shorter names. "be descriptive" they said. Also we had more advanced editors with copy-paste, search and replace, etc... If there was an objection for overly long variables, it was more about screen real estate than typing speed.
I'd say the case where it mattered would be interactive shells, UNIX shells in particular, because for DOS, commands were limited to 8 characters by the filesystem, another technical limitation. But then came completion, making typing speed not really an issue, but you still want to be able to fit your command in one line, because otherwise it is annoying.
So: technical limitation or readability rather than typing speed.
A ? B : C => !B -> C
The programmer’s if-else goes like “If the window is open, close it. Else, leave it closed.” This is not a natural construction outside of programming, people would use “otherwise” or “if not” instead.
(“Else” stands for “if the window is not open” in the above.)
The Crime and Punishment if-else is more like “If the window is open, close it. Else, cold air will enter.” This is normal English.
(“Else” stands for “if you don’t close it” here. It can’t stand for “if the window is not open”.)
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'.
"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.
> 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.
> Make sure to buy flour, and we'll be able to bake the cake.
> Make sure to buy flour, so we'll be able to bake the cake.
> Make sure to buy flour, and so we'll be able to bake the cake.
I feel like I’m going crazy reading this thread today. Else is not a rare or archaic word.
https://www.merriam-webster.com/dictionary/or%20else
> [He said to do this, or I'll regret it.]
> [He said to do this, else I'll regret it.]
I imagine people couldn't decide on which conjunction to use since they both work, used both incorrectly, stopped using plain "else", then started thinking they needed to prefix "or" before "else". Dictionaries then adjusted, removing the conjunction entry of "else" and adding "or else" as a conjunctive phrase.
No, it's what the author claims to have happened. I am strongly disputing their thesis as spurious.
On the contrary it's a normal everyday word that makes perfect grammatical sense in the given context.
The Wiktionary entry at https://en.wiktionary.org/wiki/else lists three use forms;
Adjective: When all else fails, read the instructions
Adverb: How else can it be done?
Conjunction: Then the Wronskian of f and g must be nonzero,
else they could not be linearly independent.
The claim is, I believe, that the conjunction form (the third one) does not predate its use in programming.The "someone else" and "nothing else" examples you listed are the adjective form.
The "or" in "or else" is the conjunction, not the "else".
You should be looking for something like " "Yea , but what am I ? a scholar, or a schoolmaster, else some youth".
Another thing to check would be if earlier uses were only in binary exclusive cases, like "One if by land, else two if by sea", or also with 3 or more terms, like "One if by land, two if by sea, else three if by air."
I don't know how to carry out this sort of search.
I did find this example, however:
> "My brother is poor, and I want to look as much like him as I can, else he may feel distant from me."
From Mill on the Floss, published by George Eliot in 1860.
With "else he may" as a search time, I found other examples in archive.org, like https://archive.org/details/sim_christian-intelligencer_1835... from 1835 .
Elsa would be closer.
Or “Elseh”.
And yeah, Elsa was common too.
[1] https://www.ssa.gov/oact/babynames/decades/names1920s.html
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"
Men with the first name 'Even' 73
Men and women with the last name 'Even' 11
‘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).
“Er trinkt heute Kaffee, sonst trinkt er nur Tee.”
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.
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.
Nope, "wenn" is both "if" and "when", it's not limited to time.
EDV - maybe a less glitzy term for "tech" - is still used occasionally by Gen-Xers.
Fall a1): Es gilt ... falls x < 0,
Fall a2): Es gilt ... falls x = 0,
Fall a3): Es gilt ... sonst.
Definitely have seen it written like that in mathematical proofs, you can even leave "Es gilt" and just write your proposition. On paper I would probably have placed a Halmos after sonst due to muscle memory lol.
Also if you threaten somebody with an "or else..." it works the same in German "sonst..."
We've reverted it now, so perhaps nature will heal itself, but it's amazing what an effect titles have on discussion. That's why, on HN, titles are not the prerogative of the submitter: "Please use the original title, unless it is misleading or linkbait; don't editorialize." - https://news.ycombinator.com/newsguidelines.html.
Submitters: If you want to say what you think is important about an article, that's fine, but do it by adding a comment to the thread. Then your view will be on a level playing field with everyone else's: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&so...
(Fortunately, this doesn't seem to be a pattern with theanonymousone's submissions. At least not from the random sample I took a quick look at.)
My interest in the article was in the German link of the word, so wanted to really emphasize that. I made a mistake it seems, if only by not simply saying ".. was probably a german translation"
https://news.ycombinator.com/item?id=25404226 (Dec 13, 2020 - 12 comments)
https://news.ycombinator.com/item?id=25406211 (Dec 13, 2020 - 249 comments)
(Some of the 249 comments are from the author of the post - https://news.ycombinator.com/threads?id=enf)
https://news.ycombinator.com/item?id=28489930 (Sep 11, 2021 - 18 comments)
The current submission is from 4 days ago and must've been placed in the second-chance pool.
wewewedxfgdf•1d ago
dboreham•1d ago
rapidaneurism•1d ago