I hate having mandatory semicolons in a language, no matter how beautiful the language is otherwise. What about you?
Would you choose one language over another language for something as minor as the presence or absence of semicolon?
Corresponding tweet for this thread:
Share link for this tweet.
What’s the big deal? I prefer that to Python’s significant whitespace.
Python’s significant whitespace was the exact reason I chose Ruby over Python when I was new to web development.
I’m not a fan either, but I would probably judge based on overall feel or use of language
Definitely prefer not to have them but wouldn’t base my choice in it. Also joining the choir of choosing it over significant white space.
I mean sure, not the best ergonomics but in Rust in particular the lack of a semicolon means that you want to return this expression to the caller which, albeit easy to miss for a human, is enforced by a very strict compiler that will tell you very clearly what you did wrong. So really, not such a problem as many in the past made it to be.
There are languages with not very clear error messages however and there the semicolons – and their misplacement – can be a real productivity killer.
To that I say: don’t use these languages!
I don’t mind semicolons. Or lack of it. What I do mind is a high number of wtf in a language.
Edit: What @dimitarvp said.
I don’t think it’s language which should adapts to programmers, but the opposite…
Even if a language has semicolon, space indentation or whatever, programming starts on a paper
Few languages actually have truly mandatory semicolons (like C is one). Most semicolon usage in languages (like erlang) is actually just another operator, like
<left> + <right>, but where
<left> ; <right> is just the sequence operator that runs the left expression, throws away the result, then runs the right expression, and returns its result. Languages that use a semicolon as a statement terminator (like C) are indeed annoying, but when it’s a proper operator then it’s far better. ^.^
However, I don’t care one way or the other, a single token isn’t going to change a language usage for me at all.
I prefer semicolons ;
It’s just one of many things that should be considered, if it makes any difference to you. All else being equal, or at least balanced, I’d go with the one that doesn’t require semicolons – but all else is rarely equal.