It is a bug on JSMin. Minifying should never alter code behaviour.
The minification isn't breaking the code. The authors had an incorrect expectation of how JSMin would minify the code. By the very act of minifying code where new lines matter your are always potentially changing the behavior.
Crockford on Bootstrap's semicolon omission: “insanely stupid code”
171–180 of 224 posts
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#172I'm new to JavaScript, but from what I can tell, the no-semicolons style - is incompatible with existing tools - is incompatible in places with upcoming versions of JavaScript - is harder to refactor, since you might need to add additional tokens to the beginning of lines depending on the previous lines - is confusing to new JavaScript programmers, since + it goes against the recommendations of many of the most popul…
somethingHappened or otherwiseDo(x)
used to be idiomatic perl (and might well still be for all I know).Edit: Just for amusement it would probably be:
somethingHappened not { x otherwiseDo } if
in PostScriptRe: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#173Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#174Earlier quoted context omitted.
I found the whole discussion quite sad, the stupid animated GIFs in particular. I became even more sad when I noticed the discussion is being held on GitHub, not Reddit or 4chan. Scrolled through, won't participate. I'd much rather build interesting application.
I wonder when bug tracking sites are going to block reddit referrers (or just prevent them from posting). I've seen this before in comments to PHP bugs and bugzilla bugs.
People tend to have pretty stiff sticks up their arses in such discussions.
Humor, even toilet humor, can remove fear and remind everyone that a debate over a semicolon is not necessarily a life/death situation.
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#175There's something horribly wrong with everything about this. Why is such a smart person as Crockford wasting his time arguing about semicolons in 2012? Why is this at the top of the most popular hacker website? Why are people writing detailed opinions about semicolons in this thread (with surely more to come?) One would hope that at least over time the bike sheds being argued about would start to at least evolve into…
I found the whole discussion quite sad, the stupid animated GIFs in particular. I became even more sad when I noticed the discussion is being held on GitHub, not Reddit or 4chan. Scrolled through, won't participate. I'd much rather build interesting application.
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#176I'm new to JavaScript, but from what I can tell, the no-semicolons style - is incompatible with existing tools - is incompatible in places with upcoming versions of JavaScript - is harder to refactor, since you might need to add additional tokens to the beginning of lines depending on the previous lines - is confusing to new JavaScript programmers, since + it goes against the recommendations of many of the most popul…
Actually constructs like: somethingHappened or otherwiseDo(x) used to be idiomatic perl (and might well still be for all I know). Edit: Just for amusement it would probably be: somethingHappened not { x otherwiseDo } if in PostScript
open FILE, "filename.txt" or die
Which is nice enough to read (and can be seen in actual examples around the web: http://www.perlfect.com/articles/perlfile.shtml )The semicolon wars frustrate me. We have an arbiter of what's correct/valid syntax and what isn't. It's the freaking lexer, heaping additional prescriptivism on top for something as trivial as semicolons is irritating. If your code has ambiguity problems, fix it by writing unambiguous code. Semicolons are not the only way.
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#177For those that agree with leaving semi-colons out of JavaScript that they write for projects, can you explain what the benefit of doing so actually is? Seems like people are valuing aesthetics over producing code that works for 100% of the users/situations.
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#178Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#179There's something horribly wrong with everything about this. Why is such a smart person as Crockford wasting his time arguing about semicolons in 2012? Why is this at the top of the most popular hacker website? Why are people writing detailed opinions about semicolons in this thread (with surely more to come?) One would hope that at least over time the bike sheds being argued about would start to at least evolve into…
What's wrong with it? It's like arguing about grammar. We've been going back and forth on the Oxford Comma for at least 300 years now, with no end in sight.
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#180Earlier quoted context omitted.
What's wrong with it? It's like arguing about grammar. We've been going back and forth on the Oxford Comma for at least 300 years now, with no end in sight.
I'm just barely suppressing an urge to rant on the obvious superiority of the Oxford Comma, which I suppose means you are absolutely right.