3 ms·
This blew my mind. Not the answer, but the question - I'm a native English speaker, how did I never notice that else makes no sense? Clearly I've been programmi
by llimos 6y ago
This blew my mind. Not the answer, but the question - I'm a native English speaker, how did I never notice that else makes no sense? Clearly I've been programming for far too long :)
EDIT: Thinking about it a bit more, "or else" is valid English, although not ususally following "if". More like, "Do this, or else I will...".
Perhaps it was supposed to be "or else", and "or" was already a keyword so we're left with "else"? But it still doesn't follow well from "if" so the bad translation from German (possibly using a dictionary) is still more likely.
- Philadelphia 6y agoIt’s a common and accepted construction in English “or else used to say what will happen if another thing does not happen: We must be there by six, or else we'll miss the beginning” https://dictionary.cambridge.org/us/dictionary/english/or-else https://dictionary.cambridge.org/us/dictionary/english/or-el...
- llimos 6y agoRight. But I can't think of a good sentence that starts with 'if' and contains 'or else'. It could be that the 'if' is implied if you say 'or else'. But 'otherwise' works fine following 'if' and it would probably have been better if they stuck to that. (Albeit lots more keystrokes - but as keywords go it's shorter than 'instanceof' and people don't complain about that one.)
- Philadelphia 6y agoIt’s more the concept than the grammar. You do this, or else you do that. instanceof is very new. At the time of if/else, there wasn’t anything nearly that long. It’s even too long for a filename on many computers of the era.