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…
Whatever the next disruption is in software engineering, please dear God let it be immune-by-design to this type of distraction. While your sentiment is positive, wouldn't this mean either designing things in a rigid, unambiguous manner (think C's semicolons) or changing human nature? Ambiguous choices plus human nature equals debates. An argument about semicolons does seem silly and your proposed outcome sounds nice…
Crockford on Bootstrap's semicolon omission: “insanely stupid code”
61–70 of 224 posts
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#62Earlier quoted context omitted.
Jacob ("fat") comes off looking far worse than Crockford, to my eyes (and that Kit character seems to be 7 years old). It's the arrogance and stupidity of youth facing the crotchety crankiness of experience. Crockford has earned the right to have a strong opinion here IMO. But it's not just bike-shedding. It's more pernicious than that. It's actually something that looks like bike-shedding to uninformed observers, bu…
Semi-colons aside, you never earn the right to be an ass.
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#63At the command line, an ending ';' is converted to two ;;. The compiler fetches the token ahead so compilation lags a token.
God says... C:\LoseThos\www.losethos.com\text\PARADISE.TXT
nflames the air; So started up in his own shape the Fiend. Back stept those two fair Angels, half amazed So sudden to behold the grisly king; Yet thus, unmoved with fear, accost him soon. Which of those rebel Spirits adjudged to Hell Comest thou, escaped thy prison? and, transformed, Why sat'st thou like an enemy in wait, Here watching at the head of these that sleep? Know ye not then said Satan, filled with scorn, Know ye not me? ye knew me once no mate For you, there sitting where ye durst not
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#64There'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…
Why? This unfortunate behavior is well described by Wadler's Law: http://www.haskell.org/haskellwiki/Wadlers_Law
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#65Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#66Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#67Earlier quoted context omitted.
There's a whole hipster movement going on right now around the idea of omitting semicolons from JavaScript code. I believe CoffeeScript is the culprit. Personally, I agree with Crockford -- it's dumb.
Meh, the real hipsters are just pushing comma-first.
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#68Earlier quoted context omitted.
Because standard-compliant JavaScript implementations don't require them (ECMAScript describes a model of "semicolon insertion" that implementors are supposed to follow).
Not required doesn't necessarily mean it's a good idea. If they were never needed I'd understand, but sometimes they are. I don't see the point in forcing the developer to make a conscious decision on whether to include a semicolon. Omitting semicolons also means that the correctness of a line of code is determined by the unrelated lines that follow.
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#69Crockford's stance is annoying purely because it's pedantic and because there are many libraries that embrace this style. We use django_compressor and found bugs from the compressor that uses Jsmin. So I have to use something else to compress them before hand. Are there compressors that use the syntax tree rather than transforming the source?
Is there any particular reason why you refuse to put in the semicolons in Javascript?
I used to prefer having semicolons in my javascript, then I started writing a bunch of Go. Now I wind up forgetting sometimes, though some part of me likes it, and so I continue using semicolons in my javascript.
That having been said, I think it's a matter of personal opinion (likely just what a given person is used to), and if it fits with the spec and the common usage, then you'd think a library that is expected to work with/on other libraries would try to be accommodating.
edit: To further clarify, Javascript's stance is silly, because you need to know how semicolon insertion works. It's extra knowledge you have to have. Thus, I think I agree with most here that it's easier to just use them. (Other languages have optional semicolons but they don't change the meaning of the syntax at all.)
edit2: This is GitHub, why is there not a fork already with this issue behind us?
Re: Crockford on Bootstrap's semicolon omission: “insanely stupid code”
#70It doesn't take a lot more effort to rephrase fat's response to be more cordial.
"Hi @englishextra, those two lines are valid JavaScript. We try not to use semicolons whey they aren't necessary. See (insert link to the wiki).
"JSMin doesn't perform well on bits of JS like this. Maybe you can discuss it with @douglascrockford ?"
Flamewar avoided (probably) and more stuff getting done.