Hacker News new | comments | show | ask | jobs | submit login

I think the other thing that goes unmentioned is that a single semi-colon on a line in a file would pretty much end this debate.

Perhaps I've worked too much in teams, but surely "path of least resistance" has to factor some, right? I mean, if the choice is add a semi-colon to a line in a file versus asking somebody else to rewrite the compiler to be able to accept it, surely common sense would just be to add the semi-colon.

It doesn't mean that you're wrong, or that your code is broken, or that Crockford is smarter than you... but now you have code that works and compiles and that people can use.

Surely, that's gotta count for something, right?




Even if we inserted the semicolon, JSMin would still be broken :)


No.

Sure it is the easier solution right now. But in the long run that would mean the Crockford would be able to dictate the style of Javascript to whatever the hell he wants.

Given how important Javascript is now (and will be in the future) we cannot allow any one person to retard the entire future.

Anyway use Googles closure compiler -- it can actually handle Javascript.


I think that's a visceral reaction based on his rudeness.

So long as he keeps building tools and utilities that people rely on, and that people use, he is at least influencing the direction of Javascript and, knowing that, I'd think one might take heed when Crockford says "this will break in the future", as he happens to have more insight into the language than most.

I understand that he wasn't polite, and I certainly understand the desire for the 'asshole' to be proven wrong. And maybe he is. Of course, that doesn't make him wrong, and it doesn't mean that he's "retarding the future" either, necessarily.

But the fact that jsmin is perhaps the most widely deployed JS minification utility does matter, whether anyone chooses to accept it or not.

And if you really think that he is retarding the future, the correct answer probably isn't to bicker about it on the internet, but to create a better compiler (or work on getting a better compiler accepted) as de facto.

At the end of the day though, Fat is the guy who has to deal with all the tickets talking about 'This doesn't compile in jsmin', and I'd think his life would ultimately be better off if he just added a semi-colon.

Of course, that's my opinion only, so take it for what it's worth.


But of course, we won't break existing code like those two lines from Bootstrap in the future (not per the promises/concurrency strawman, anyway). This was a point my blog took pains to make.

Doug may have forgotten the [no LineTerminator here] restriction, or he may not want it to the left of infix-! for promises, but I am certain that the whole of TC39 will not agree to such a breaking change.


we don't need to work on a better compiler then jsmin, because we have three -- uglifyjs, closure compiler, and yui compressor. They are all better then jsmin by any metric you choose, and they also don't break on automatic semicolon insertion.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: