4 ms·
Why elif en not juste elseif?
by GrumpyNl 7y ago
Why elif en not juste elseif?
- mehrdadn 7y agoOr just else if... but honestly elif is easiest to type and it's not hard to understand.
- reallydude 7y agoHard is being used in a "type the keys" sense. It's more complexity to borrow idioms from languages then slightly change the syntax (PHP!), which isn't necessary. Like most languages, choices are made without evidence (but plenty of anecdotes and personal style).
- akubera 7y agoPerhaps to align with the final "else" clause, or it was familiar to c programmers due to the c-preprocessor directive https://gcc.gnu.org/onlinedocs/cpp/Elif.html https://gcc.gnu.org/onlinedocs/cpp/Elif.html, or they were mindful that every character counts when you want to push 80 character max-line-length style? To be clear, that's not a new feature in 3.8.
- dreary_dugong 7y agoIt fits in a single indent space. At least that's what my professor told us, and it seems to be confirmed by a quick online search.