Hacker News new | past | comments | ask | show | jobs | submit login

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

Sure you can!

Shakespeare used 'else' in the same sense as 'otherwise': https://www.shakespeareswords.com/Public/GlossaryHeadword.as...

"else used as a conjunction" https://wordtype.org/of/else

"Or else!" was common speech before computers, and a common vague cartoon/cowboy/sign threat.




There is some anecdotal support for the article's position in a recent [1] article about the origin of the C programming language -- apparently the C predecessor language CPL used "OR" as a keyword where most modern languages now use "else", on precisely these grammatical grounds, as understood by Christopher Strachey.

[1] https://arstechnica.com/features/2020/12/a-damn-stupid-thing...


Yes, that struck me as weird too, that someone would call it incorrect. I'm a native of the United States (the Midwest). I never gave the word a second thought. I was flummoxed by Strachey's remark and flummoxed again by this article's long investigation.


I am the author, and I mean that I can say "or else" in a normal sentence, but I cannot say "else" without an "or" in normal speech in my normal dialect.


Hmmm, thinking about my dialect of English (Lancastrian) I can certainly say else without an or and it doesn't sound unnatural to my ears. Something like "if you're hungry now then I can make you a sandwich, else we'll eat when we get to the pub" doesn't sound more awkward than using otherwise. I can't say whether that's just because the Lancastrian dialect preserves quite a few old fashioned usages that have fallen out of use in "standard" (i.e. southern posh) British English and American English, whether it's common usage in other dialects of British English, or if its just because I'm a programmer. Going to go ask some English teachers!


The consensus amongst the three English teachers I asked was that it should be "or else" or "otherwise" and that it's probably ungrammatical, although none of them could explain why. The one who is also an actor said "it works as a line" and she wouldn't think twice about it in a script or as written dialog. Interesting one though!


It's definitely not ungrammatical. But it is uncommon today, especially in General American English.


I think it's relatively common in british english.

Certainly, from cumbria, it sounds quite natural also.

It's more spoken dialect than written. "What else do you want to do?" etc.


Funnily enough, to me "what else" sounds more like "what would you like to do in addition" as opposed to "what would you like to do otherwise".

Certainly in Australia, "anything else with that" is quite common in shops, particularly in food shops, or pubs. Or at least it used to be be when I was there.


Sure, but if you ask for A, B and C and someone asks "what else?" then they mean "what about things that aren't A, B or C?" It's still the same basic meaning, set complement, but about things rather than logical states.


The question isn't so much whether "else" is used at all, but rather whether it's used as a conjunction. That's why the article author mentioned "or else": here "or" is the conjunction, so that proves "else" isn't fulfilling that role. In this example you gave:

> What else do you want to do?

"else" is acting like a noun rather than a conjunction (compare with "what activity do you want to do?).


Works in my genericsSouthern British english dialect too. Think it might have been dropped in American english where it might be considered quite formal.


You’ve framed it in the article and here again as a correctness issue, but it’s not a correctness issue. It’s fair to say you haven’t heard it, or that it’s uncommon today, but if you use it, it’s not wrong. And people will understand you, even if you do get a sideways glance from some people. You can use “else” without “or”, if you like.

The article was fascinating, especially the historical examples from different programming languages, and I buy the plausibility of a German speaker using “else” this way... I work with German speakers and they do it all the time. From the small amount of German I know, it feels like there might be some parallel with “als”. Another common one they use that’s less common with English speakers is starting a sentence with “Means”, as opposed to “It means” or “That means”. It’s not incorrect, but it does sound different.

I just don’t think the German speaker explanation is the only possible one, because there absolutely is precedence for the English use of ‘else’ as a conjunction. Usage of ‘else’ with ‘or’ also makes some plausible sense here too...


> The article was fascinating, especially the historical examples from different programming languages, and I buy the plausibility of a German speaker using “else” this way... I work with German speakers and they do it all the time. From the small amount of German I know, it feels like there might be some parallel with “als”.

I‘m a native German.

It was certainly not „als“ as this translates to either „than“ as in „more than“ or „when“ as in „when I came home“.

My guess is that the original German text used „falls“ for „if“ and „sonst“ for „else“:

„falls A > 0 dann X“

„sonst Y“


I shouldn't speculate I guess. :) Als sounds like a cognate to else, but maybe it's not related.

Looking up etymology for "else", I see it comes from old High German's "elles". https://en.wiktionary.org/wiki/else#Etymology

> „falls“ for „if“

This one is interesting in the same way that it might lead me to the wrong conclusion. Is 'falls' related to 'falsch' at all? The English 'falls' is used quite differently, though you can start to see the relationship. For example something like "this falls somewhere between the two".

Language is fascinating! I love learning about how the colloquial meanings of certain cognates between languages sometimes have rather different meanings, especially between German and English since English is a Germanic language. It illuminates the interesting path some of my everyday words evolved from, and it's often rather different than one might guess.


> Is 'falls' related to 'falsch' at all?

Nope, according to Kluge's German etymological dictionary, "falls" is from a Germanic root most literally meaning falling (down) (just like English "fall"), while "falsch" is borrowed from Latin falsus, which in turn comes from the Latin verb fallere, to deceive (like "fallacy"). (Wiktionary also traces the two of them to different Indo-European roots.)

There's an interesting side note that German Fall (the origin of "falls") means "case" (both in the grammatical sense, related to noun forms, and in the senses of "a logical possibility" or "a fact": Wittgenstein's Tractatus starts out with "Die Welt ist alles, was der Fall ist" -- "The world is everything that is the case"), and in fact the English word "case" comes from Latin "casus" (originally literally 'fall' as in the act of falling down), and the German use of Fall in the senses having to do with logic and grammar was a conscious loan translation which Kluge says was devised by Christoph Helwig in the 17th century (intending to translate Latin "casus").

Kluge says that the grammatical sense of Latin "casus" for noun cases was itself a loan translation in Latin from the Greek πτῶσις (literally, 'fall(ing)') which was used by "Stoics" to refer to noun forms by analogy with the possible ways that dice could "fall" when you rolled them. (I don't know why the Stoics would have been the first to write about grammar this way, but maybe...) Apparently the word ptosis is now mainly used to refer to drooping eyelids (!).

Anyway, the idea of different ways that dice (or nouns or fate or situations) could "fall" are different "cases" is a commonality among many languages but the relationship is apparently conscious, on the part of educated people like Christoph Helwig who were trying to find ways of translating technical terms.

That also means that if the German programmers in the mid-20th century were trying to translate "falls ... dann ... sonst" the best English translation would plausibly have been "case ... then ... else" rather than "if ... then ... else". :-)

(English "else" is usually used to translate "sonst" in "was sonst"/"sonst (et)was", but "otherwise" is usually used to translate "sonst" as a conjunction. So you could also imagine that the "else" was inspired either by the dialectal form some other people in this thread are mentioning, or by someone who just didn't realize that "otherwise" would be more usual in this context for Americans.)


Furthermore: "otherwise" translates to "andernfalls", which is basically "im anderen Fall" i.e. "in the other case".


I was a linguistics major in college and therefore am a descriptivist, not a prescriptivist about language. When I say I cannot say this, I mean that this construct does not exist in the ordinary dialect that I speak, in the same way that I can say "that doesn't need washed" even though speakers of many other dialects have to say "washing" instead. If it is in someone else's dialect, they can feel free to say it, but my experience is that it is rare.


> If it is in someone else's dialect, they can feel free to say it, but my experience is that it is rare.

Agreed. And this is the reason why use of 'else' in programming languages might not have had to be invented, right?


No. The article goes into great detail on this - if-else as a construct took a lot of iterations to finally appear in its current form. That fact is largely independent of how natural the word 'else' feels. If we used 'otherwise' instead of 'else', the control flow construct still wouldn't have been obvious.


Yes it is clear that the control flow construct was invented in this form, and that programming languages evolved. It’s still true that this use of “else” paralleled use of “else” in English, and that it’s appearance in programming languages, while interesting, is not a “mystery” or a misuse of language that was “invented” by German programmers.


Below is one of the definitions for "else" in the online edition of the Oxford English Dictionary followed by some of the citations. Some are archaic and some are from poetry, but the last two citations seem to indicate fairly recent colloquial usage.

3.a. In another case, under other circumstances; otherwise, on any other supposition; if not. Now usually preceded by or: see or else at or conj.1 6.

a1225 (c1200) Vices & Virtues (1888) 27 (MED) All ȝelief ðu fastliche, elles ðu, ne namann ne mai bien ȝeboreȝen. a1375 (c1350) William of Palerne (1867) l. 1647 (MED) Foule þow me fodest wiþ þi faire wordes, elles had i deide for duel. 1570 T. Tusser Hundreth Good Pointes Husbandry (new ed.) f. 19 Where Iuie embraceth the tree very sore, kill Iuie, or tree else will adle no more. 1590 E. Spenser Faerie Queene i. i. sig. A5v Strangle her, els she sure will strangle thee. 1837 J. H. Newman Parochial Serm. (ed. 3) I. v. 115 Else how should any one be saved? 1873 R. Browning Red Cotton Night-cap Country ii. 115 Boughs above, Darken, deform the path, else sun would streak. 1938 H. L. Mencken Diary 10 Aug. (1989) 112 Black has told friends that this indicates to him that Reed must be a trimmer, else he would not be favored by all parties. 2013 L. Powell Witch Fire xvii. 155 Shut up, else I'll only make it worse for you. Both of you.

And here are a few citations I found by searching at Project Gutenberg:

They were, in fact, beatified bees, who had to be solemnly invited to attend the death mass when the owner died, else they would fly away, refusing to stay.

https://www.gutenberg.org/files/14036/14036-h/14036-h.htm

“now, I hope, my trial is ended; else its length will be, as in some other cases, the worst of punishments.”

https://www.gutenberg.org/files/9414/9414-h/9414-h.htm

It is absolutely necessary that the plate be chemically clean all over, else the film of collodion, upon drying, will split, and the negative be spoilt.

https://www.gutenberg.org/files/52378/52378-h/52378-h.htm


Anti-prescriptivists are a myth. Sure, there are people who are deluded enough to think that they are “descriptivists” through and through, they may even shroud their prescriptivism with relativistic jargon, but the actions speak more than words. I have never seen a human who doesn’t think that some words and grammar constructions are appropriate and some are not.


Wouldn't it be fair to say that it's just a shortened version of "or else"? Just like most programming languages skip "then" in "if ... then" even though it's often required for the sentence to look natural.


Algol was not prone to abbreviation. Algol 58 used "or if," so if they had wanted "or else," they would have used "or else."


Maybe not in your dialect of English, but what about older dialects?

"Pay for your beer. Else, leave this place at once!"


This is a usage that I have no memory of ever encountering in any context other than computer programming. It may be in some dialects, but not in ones I have come in conscious contact with.


Actually, no, you are right: I seem to have received one email message that begins a sentence with "else" in 1996 and another in 2003. So it is not unknown to me, but it is quite rare.


Fascinating. English is not my first language but I thought https://en.wiktionary.org/wiki/what_else_is_new and https://www.ldoceonline.com/dictionary/what-else-can-somebod... are perfectly fine phrases.


That's "else" used as an adverb, not a conjunction. Author is talking about the latter.


Even if it weren’t, that just means we would have called the construct “if-then-otherwise” instead (perhaps abbreviated as othw).


Yup, it grated on me to read that at the beginning.

Though: else as a conjunction isn't quite archaic today. But, it is one of those usages that when I encounter it, I begin to suspect that the document I'm reading is rather old.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: