Live data from Hacker News

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

github.com

221–224 of 224 posts

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

#221
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…

Yes/no/sort of, I actually found this an quite enlightening discussion. My opinion went from:

1. I'm going to use three semicolons for every one Fat doesn't use, the arrogant twat! ;-)

2. Bike shed.

3. Some of these arguments actually kind of make sense... I Prefer the semicolonlessness of Python as well. But even though I know the ASI rules, I don't want to spend the mental effort to check every line for unwanted continuation.

4. And then someone linked to http://npmjs.org/doc/coding-style.html#Semicolons which is a style that has marginally more semicolons than Fat would (apparently) use, but I can use this pretty much without thinking.

I might give it a go. See how it feels. It's important to not stick to old conventions just because KIDS THESE DAYS.

If you never hear from me again, it's because I've drowned in an ocean of obscure bugs.

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

#222
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.

How do you know it was Redditors?

I subscribe to quite a few programming related subreddits and while the comments there are more informal (people can make a joke without getting downvoted, for instance) the level of the discussion you're referring to is not very representative of programming subreddits either.

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

#223
post #115

Earlier quoted context omitted.

Here is what you're missing. Language lawyering is fine and dandy when you know exactly which compiler will be used and you know exactly how it works. But on the web that isn't the case. You can write code, but you have no control over what browsers, past, present and future, it will get run on. And it is your responsibility to make that work. According to the spec, you may be right. But in practice you're the one wh…

Crockford is releasing a tool which is compatible with his opinions, not with JavaScript. All browsers execute that code fine, present and past, and at least for the next decade or so. Crockford can be an arrogant ass about this stuff, that's why jshint exists, because not agreeing with Crockford does not mean bad JavaScript, no matter what he would have you believe

It's about JSMin, not JSLint. Crockford has actually several products ;-) And JSMin is IMHO not really opinionated.

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

#224

Earlier quoted context omitted.

I don't follow this argument. Putting a semicolon at the end of every statement, regardless of what follows, seems to be an even easier way to avoid making this bug.

> Putting a semicolon at the end of every statement Sounds like a viable strategy - but you have to parse where every statement ends in your head. The situations where you don't end a line with a semi-colon are more numerous than the rules you need to write semi-colon-free code. Besides, if it's so simple, why not leave it to the interpreter?

It's trivial to parse when statements end in my head, because I write code in a structure that makes it unbelievably clear where statements begin and end (with or without semicolons.) Knowing that is of prime importance to human readability, so it has to be dead obvious or the code sucks.

I'd love to leave it to the interpreter, but the interpreter doesn't put a semicolon at the end of every statement for me, as I write them naturally. It puts a semicolon at the end of... most statements.

Post reply on HN