Of parser-fetishists and semi-colons
31–40 of 125 posts
Re: Of parser-fetishists and semi-colons
#32I think the argument that we shouldn't rely on the parser for certain language features is a bit silly (including interpreting end-of-statements). The language is precisely what the parser says it is, and nothing more or less. JSMin is free to not do what the parser does of course, but that won't be Javascript.
Surely the language is precisely what the spec says it is? "The parser is the spec" is a nasty design smell, IMO.
If he wants his code to work with this particular minifier, he should include the semicolon, nothing more, nothing less.
Is a bit like trying to speak in official french. It might be correct according to the officials charged with protecting the french language, but you will sound extremely odd to most french people.
Re: Of parser-fetishists and semi-colons
#33Anyone else think this is by far the most boring technical debate ever to hit HN?
Re: Of parser-fetishists and semi-colons
#34That's an excellent and important point beyond the petty incident. You write code solely for humans, not for the compiler.
Re: Of parser-fetishists and semi-colons
#35I've been shocked at the level of disrespect for language standards here. Yes: adding semicolons is probably good practice because it avoids the chance of stumbling over bugs like this. And yes: the ASI feature in Javascript is in hindsight a terrible mistake. That said: you go to war with the language you have, not the one you might want or wish to have. ECMAScript is ECMAScript. Arguing that your transformation too…
I think you missed the point. This is not really about whether semicolons are required or not. The point is that in order to ensure maintainability of code you should try to use language (and framework) in a way which ensures better maintainability, supportability, and portability of your code. Look, the statement like "a && b" is 100% valid in many languages but in order to increase maintainability, supportability,…
Learn to read and maintain the language you have, because you can't win this.
Re: Of parser-fetishists and semi-colons
#36This whole debate seems like two folks stuck in their way blowing a whole thing out of proportion. How about Bootstrap adds the damn semi-colon and JSLint accepts that for the most part the lack of a semi-colon is working and "valid" JS add allows for the edge case. Now everyone gets to go home happy.
Re: Of parser-fetishists and semi-colons
#37This whole debacle is the epitome of what I call alpha-nerd behavior, and it's slowly killing my interest in software development.
It's actually quite easy to develop software while being only vaguely aware of and emotionally uninvested in these sorts of kerfuffles.
[1] - two or more is even worse: they're like male gerbils or betta fish, in that they fight all the time.
Re: Of parser-fetishists and semi-colons
#38Anyone else think this is by far the most boring technical debate ever to hit HN?
I started programming and hacking because i wanted to make something cool and interesting which others would appreciate, not to bicker about something as silly as semicolons. If i wanted to do that, i'd work in retail. When an argument over something so trivial gets to this level, i cannot help but be bored by it.
Re: Of parser-fetishists and semi-colons
#39I think the argument that we shouldn't rely on the parser for certain language features is a bit silly (including interpreting end-of-statements). The language is precisely what the parser says it is, and nothing more or less. JSMin is free to not do what the parser does of course, but that won't be Javascript.
Surely the language is precisely what the spec says it is? "The parser is the spec" is a nasty design smell, IMO.
Re: Of parser-fetishists and semi-colons
#40Earlier quoted context omitted.
Of the sustained debates, I feel it is tied with the "my nosql is better than yours" debate. Both of them seem to boil down to "understand your tools, your use case may not map to the thing someone else is advocating for their use case".
This is so, so, so much more boring than NoSQL. I agree that Riak vs. Mongo has gotten pretty boring. But this is semicolons. For f's sake.