Live data from Hacker News

Crockford on Bootstrap's semicolon omission: “insanely stupid code”

github.com

171–180 of 224 posts

Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”

#171

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.

[deleted]

Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”

#172

I'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

Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”

#174
post #119
post #109

Earlier 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.

I disagree. Imho a little infantile humor in places where it "doesn't belong" can be quite refreshing - as long as it remains the exception rather than the rule.

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”

#175
post #109
post #33

There'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.

I felt the same way. Once I got to @pyalot actually belittling @shawnpresser's JSMin fix, I realized just how religious and immature this debate had become.

Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”

#176

I'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

And would allow for constructions like

  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”

#177

For 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.

You will never produce code that works for 100% of users and situations.

Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”

#179
post #95
post #33

There'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.

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.

Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”

#180
post #95

Earlier 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.

Look, I know the rules. That's why I leave the comma out.
Post reply on HN