Hacker News new | ask | show | jobs
by nuclearsandwich 5464 days ago
I see your point. Punctuation is a vector for meaning and clarity but is Javascript's syntax any more informative than Coffeescript's? It isn't in my observation. It certainly offers more flexibility in style, but why would you need it? I can't conceive of a reason besides minification.

Your comparison with novels I think is a bit skewed. Literature has a whole different set of readability enhancements such as fully justified text, variable-width fonts, as well as margins and padding. Punctuation in English has been evolving for centuries as people settle on the minimum needed to convey the full meaning as unambiguously as possible. But English also has many many more sets of valid (as well as various definitions of valid) constructs than Javascript does and thus may require a more robus set of punctuation.

1 comments

There's a principled point about aesthetics and removing unnecessary redundancy. But that shouldn't be confused with whether semicolons affect your ability to think about code. Really I can't imagine how someone could be significantly distracted by semicolons, once they're used to a language, to the extent that it occupies their conscious brain in any way whatsoever. It does take familiarity to get there, but I can't imagine having a mind where this didn't seem transparent and rather irrelevant very quickly.
You're absolutely right, I spent most of the past three years writing Java, C++, C, and C# and they all use semicolons and I certainly forgot about them whilst coding in those langs. But the penalty is in transitioning between languages that use or don't use those features. When I'm writing in C and the like, I tend to stick within that language. But with JavaScript and Ruby, I do a lot more context switching back and forth. Anything I can do to reduce the penalty of moving between one and the other is worth doing in my opinion. Especially when it doesn't affect the final result.