12 ms·
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 t
by gfodor 15y ago
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 arguments about bike garages and eventually bike factories. But I guess the bike shed is forever a bike shed, as long as we're making bikes.
Whatever the next disruption is in software engineering, please dear God let it be immune-by-design to this type of distraction.
- batista 15y ago>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? The disturbing thing is the idiot arguing about implicit semicolons in a language with not good support for them, in a general use library.
- batista 15y agoThanks for the donwvoting, at least Brendan Eich and Douglas Cockford agree with me... http://brendaneich.com/2012/04/the-infernal-semicolon/ http://brendaneich.com/2012/04/the-infernal-semicolon/
- deleted 15y ago[deleted]
- saurik 15y ago... Crockford is the developer of JSMin, and was explicitly dragged into the conversation because people claim (possibly correctly) that it is a bug in JSMin than when it is given code with semi-colons that are missing in places that the JavaScript specification claims are optional (possibly also stupidly), it generates output that is not semantically equivalent to the original code. Your statement thereby makes no sense: this is precisely the kind of argument and conversation--a bug report from a user that itself can be construed as a question about what the purpose of the project is and what parts of the specification it will choose to support--that one would hope the primary maintainer of a project should be "wasting his time" involving himself with.
- gfodor 15y agoI wasn't literally asking why is this happening. I was pointing out that it's sad that we live in a world where someone like Crockford is spending brain cycles talking about semicolons, regardless of the reason.
- gurkendoktor 15y agoIn the big picture, I agree that everything about the GitHub thread, meta or not, is terrible. But any author of a language minification library will have to deal with corner cases. I see no easy way out. Would it be better for Crockford not to have started writing JSMin?
- petercooper 15y agoWhatever 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, but how could we get there?
- gfodor 15y agoMy point wasn't that arguments are avoidable altogether. It was simply that one would hope the arguments would evolve in complexity or at the very least change in specifics. Since that doesn't seem to be happening, and the same old tired topics keep coming up, I think it's important that designers of future software engineering tools consider how immune their systems are to the grab bag of arguments we've been hearing since the 1970s about syntax and semantics.
- yew 15y agoWe already have something akin to that - Python (PEP 8 specifically). People still find things to argue about though, presumably because they enjoy it. On the upside, it happens less often!
- deleted 15y ago[deleted]
- gbog 15y agoYou say "rigid, unambiguous manner" as if it was something bad, not agile, boring or uncool. I disagree with this way to present things. A good computer language should have a solid unambiguous syntax (think lisp), upon which we can build agile tools and avoid the daily useless messes we get from JavaScript. Edit: rm js rant
- malandrew 15y agoWhy? This unfortunate behavior is well described by Wadler's Law: http://www.haskell.org/haskellwiki/Wadlers_Law http://www.haskell.org/haskellwiki/Wadlers_Law
- gfodor 15y agoThis is great, thanks. The only logical conclusion is that engineers should be choosing tools that have the least syntactical surface area to argue over. :)
- regularfry 15y agoWhatever you do, don't go looking for the discussions that happened around scheme r6rs...
- ricardobeat 15y agoAssembler? ;)
- codeka 15y agoBrainfk, clearly.
- ExpiredLink 15y agoBerners Lee's 'principle of least power'?
- crystalis 15y agoFew people truly understand the semantics of a language, but everyone knows why indexing from 1 is bad.
- reinhardt 15y ago... that is, for some values of "everyone" ;)
- 15y ago
- barrkel 15y agoJacob ("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, but something that strongly affects cross-version compatibility. Javascript does automatic semicolon insertion by taking advantage of potentially ambiguous constructs that happen to be resolved in one way right now. But they may be actually ambiguous in the future - in the case where a unary prefix operator becomes a binary operator. Language extension usually works this way: a previously unambiguously wrong statement is made valid; but JS semicolon insertion often turns "wrong" statements into "correct" statements, so it leaves less "entropy" to be taken advantage of when increasing the power of the syntax. I think there's a strong case for JS to not insert semicolons here, and I agree with Crockford's position on not handling it in JSMin. It's the right thing to do.
- ricardobeat 15y agoSemi-colons aside, you never earn the right to be an ass.
- dhconnelly 15y agoThat's correct. Being an ass is a God-given right--you don't have to earn it.
- deleted 15y ago[deleted]
- thristian 15y agoThe 'latest revision of the future specification' you link to is, I think, the set of things the TC39 group has considered and agreed on. The list of things they are currently considering is in the strawman namespace[1] on that wiki. In particular, the "strawman:concurrency" page[2] currently says: The infix “!” operator: An eventual analog of “.“, for making eventual requests look more like immediate requests. [1]: http://wiki.ecmascript.org/doku.php?id=strawman:strawman http://wiki.ecmascript.org/doku.php?id=strawman:strawman [2]: http://wiki.ecmascript.org/doku.php?id=strawman:concurrency http://wiki.ecmascript.org/doku.php?id=strawman:concurrency
- baddox 15y agoI would hardly call this an "argument" from Crockford. There is absolutely no back-and-forth. Crockford is told there is a bug (or perhaps, a missing feature) in his software. Crockford responds that he will not change his code, and that the first guy's code is bad. Other commenters then begin arguing, but Crockford does not.
- blasdel 15y agohe eventually capitulated and fixed his broken parser: https://github.com/douglascrockford/JSMin/commit/5ca277ea452beae1c25db3bc0ef5c81309a3daf4#jsmin.c https://github.com/douglascrockford/JSMin/commit/5ca277ea452...
- phil 15y agoWhat'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.
- jwr 15y agoI 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.
- ars 15y agoI 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.
- moe 15y agoI 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.
- batista 15y agoI said something same-ish, but it seems HN is full of true professionals, with no place for humor in their work --or internet procrastination time--, that never read MAD magazine as kids...
- ars 15y agoNo, it's just noise. It's like someone yelling and acting up when other people are talking about something important to them, just because that person is bored and doesn't care about the topic. If you are bored, go somewhere else. And the net result _every_ single time is that the bug gets locked so no one can post to it. Sometimes they unlock it again after the reddit idiots have left.
- tripzilch 15y agoHow 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.
- deleted 15y ago[deleted]
- ExpiredLink 15y ago> There's something horribly wrong with everything about this. The time is ripe for Dart!
- rbanffy 15y agoOr to give back JavaScript its original syntax. edit: now that I said that, it makes a lot of sense.
- luriel 15y agoThis is one of the many reasons why I love Go's pragmatism. gofmt is the end of all this kind of silly unproductive arguments. The sad thing is that apparently some programmers take this stuff so seriously that they refuse to learn a language that wont let them use their pet brace style or whatever. I wonder how they collaborate with other programmers or if they would reject a job offer from a company that used the wrong coding style. P.S.: Also Go's syntax manages to keep code semicolon-free while avoiding the pitfalls of JavaScript.
- lucian1900 15y agoWhile whether or not to use them when designing a language is bikeshedding, JavaScript already has so pitfalls caused by semicolon insertion, their use is a must.
- ZachS 15y agoI'm curious what these pitfalls are, and how using semicolons fixes the problem.
- lucian1900 15y agohttp://stackoverflow.com/questions/444080/do-you-recommend-using-semicolons-after-every-statement-in-javascript http://stackoverflow.com/questions/444080/do-you-recommend-u...
- gambler 15y agoWell, yeah. That's a large part of the reason I don't like the hype around JavaScript. "Here is a feature. Don't ever use it. Here is a simple way to do this. This way is dumb, use a 2321 line library instead. There is nothing wrong with X, you just chose one of the 60 wrong ways of using it." I don't want to think about this kind of stuff, I have enough to worry about as it is. JavaScript is all right as a language of the present, but I really don't want it to be "the future", like many people paint it to be.
- ramblerman 15y agoWhilst fat doesn't come off great he has youth and inexperience on his side. Someone like Crockford with his 'years of experience' opening the debate by saying this kid's code is 'insanely stupid' is the real disappointment for me here. Not to mention the memes and pictures being posted further down in the thread. I hope it's a matter of time before github comes up with a way to flag these.
- tripzilch 15y agoYes/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 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.