Live data from Hacker News

Bootstrap's maintainer hates the semicolon

github.com

11–20 of 137 posts

Re: Bootstrap's maintainer hates the semicolon

#12
problem here is ruby.ruby developers hate semicolons. They ignore the decades old history opf the semicolon, and assert that the ruby/python/haskell way of indentation and semicolon-less code is the better way. They COULD be right, but im too deep seated in C/C++/Java/JS. One of the problems with javascript is the fact that it gives the choice.

Re: Bootstrap's maintainer hates the semicolon

#13
post #9

He wrote a blog post about this a while ago, I don't really get his reasoning but I guess he's happy with his decisions: http://www.wordsbyf.at/2011/10/31/i-dont-write-javascript/

And possibly some reasons why leaving semicolons off can make his or others' lives a bit annoying:

http://bonsaiden.github.com/JavaScript-Garden/#core.semicolo...

Re: Bootstrap's maintainer hates the semicolon

#14
My assembler uses my C Lex() which mostly ignores carriage_return. My asm instructions can be split on multiple lines. My define byte requires a terminating semicolon.

I once had a silly instructor who decided to show-off by not requiring a ; before asm comments on lines, and made a special editor that distributed comments into paragraphs along-side code. That's just stupid. What if you want a tool to process code -- you just increased the difficulty of parsing.

My assembler requires different opcode numonics for instuctions with 1 vs 2 args.

God says... C:\LoseThos\www.losethos.com\text\YANKEE.TXT

d not hesitate this time. The moment we were in the road I ran; and after a moment he threw dignity aside and followed. I did not want to think of what was happening in the hut--I couldn't bear it; I wanted to drive it out of my mind; so I struck into the first subject that lay under that one in my mind:

"I have had the disease those people died of, and so have nothing to fear; but if you have not had it also--"

He broke in upon me to say he was in trouble, and it was his conscience that was t

Re: Bootstrap's maintainer hates the semicolon

#15
post #4

Thanks for drawing my attention to this. Currently, I maintain a separate branch simply for adding the missing semicolons so that I can link the individual bootstrap files with my project. It's been quite annoying and I now know that the annoyance may not go away anytime soon. I hate these ideologues. But this is the trouble with JS I guess. I actually love javascript because of the highly dynamic nature of it. But t…

You can do it in Ruby and lots of other languages

Re: Bootstrap's maintainer hates the semicolon

#17
post #9

He wrote a blog post about this a while ago, I don't really get his reasoning but I guess he's happy with his decisions: http://www.wordsbyf.at/2011/10/31/i-dont-write-javascript/

This blog post accurately states the broken idea:

> Each is perfectly valid. Each behaves the same. It’s just a matter of preference and finding the style that makes most sense to you.

Part of being a good steward to a successful project is realizing that writing code for yourself is a Bad Idea™. If thousands of people are using your code, then write your code for maximum clarity, not your personal preference of how to get clever within the spec.

Code is harder to read than to write. To borrow a line from Jacob Kaplan-Moss, if I write the cleverest code that I am able to, then by definition I won't be able to understand it later.

This semicolon approach isn't invalid, but it is clearly a source of confusion, and it requires that users comprehend the choice and the tradeoffs. This seems like a poor choice for a framework whose audience is largely people who don't grok this stuff and are bolting it on wholesale.

<3 bootstrap, just my $0.02.

Re: Bootstrap's maintainer hates the semicolon

#18
How can ideologies on such futile things as a semi-colon get in the way of playing nice with others? Just put that in perspective with RMS' intransigence in his conviction and fight for freedom. Freedom and semi-colon, which is the more fundamental and worth fighting for?

Re: Bootstrap's maintainer hates the semicolon

#19
post #4

Thanks for drawing my attention to this. Currently, I maintain a separate branch simply for adding the missing semicolons so that I can link the individual bootstrap files with my project. It's been quite annoying and I now know that the annoyance may not go away anytime soon. I hate these ideologues. But this is the trouble with JS I guess. I actually love javascript because of the highly dynamic nature of it. But t…

Relying on multiple different parser's implementation of the "auto semicolon insertion guesser" feature seems insane to me.

I'm a python/haskell guy too, I hate semicolons. But I'll put up with them because javascript needs them, it doesn't enforce them, but to write sane, maintainable code it really needs them.

Javascript is enough of a mess, this kind of thing just throws gas on the fire.

Have you published your branch? I think it would be very useful.

Re: Bootstrap's maintainer hates the semicolon

#20
post #9

He wrote a blog post about this a while ago, I don't really get his reasoning but I guess he's happy with his decisions: http://www.wordsbyf.at/2011/10/31/i-dont-write-javascript/

This one bit me the other day and forced me to switch JavaScript compressors because the one I was using (it was python-based) didn't get the IIFE (http://benalman.com/news/2010/11/immediately-invoked-functio...) right when appending files together.

In this blog posting Jacob writes:

The majority of lines however don’t end with semicolons because they simply aren’t necessary and I prefer the minimalist aesthetic. For me, \n character is enough and the semicolon character is redundant.

He then points to the izs blog posting about it:

http://blog.izs.me/post/2353458699/an-open-letter-to-javascr...

Jacob calls it more 'minimalist' however it does require you to know (and think about) the rules of when Javascript accepts a newline as a line terminator and when it doesn't. In terms of cognitive minimalism 'semis-everywhere' wins. @izs even acknowledges that part of the advantage is forcing the developer to learn:

To the extent that there is an objectively “better” choice, it appears to me that the minimal-semicolon/comma-first style is slightly superior, both because it is fundamentally more scannable and because it encourages programmers to better understand the language they use.

and later:

If you don’t understand how statements in JavaScript are terminated, then you just don’t know JavaScript very well, and shouldn’t write JavaScript programs professionally without supervision, and you definitely should not tell anyone else how to write their JavaScript programs.

He excludes the possibility that you might understand the rules and still prefer to put them everywhere. So all people who disagree with his choice (which he admitted was only slightly better) tend to get categorized as people who don't understand JavaScript very well and we get a new holy war. The fact that all of the JS noobs are lumped on one side of the argument means it's not cool and we can dismiss a well reasoned opinion as ignorance.

All this being said, I personally don't care strongly one way or the other.

Post reply on HN