3 ms·
> Putting a semicolon at the end of every statement Sounds like a viable strategy - but you have to parse where every statement ends in your head. The situatio
by ricardobeat 15y ago
> Putting a semicolon at the end of every statement
Sounds like a viable strategy - but you have to parse where every statement ends in your head. The situations where you don't end a line with a semi-colon are more numerous than the rules you need to write semi-colon-free code. Besides, if it's so simple, why not leave it to the interpreter?
- mquander 15y agoIt's trivial to parse when statements end in my head, because I write code in a structure that makes it unbelievably clear where statements begin and end (with or without semicolons.) Knowing that is of prime importance to human readability, so it has to be dead obvious or the code sucks. I'd love to leave it to the interpreter, but the interpreter doesn't put a semicolon at the end of every statement for me, as I write them naturally. It puts a semicolon at the end of... most statements.