twbs / bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

Home Page:https://getbootstrap.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bootstrap-dropdown.js clearMenus() needs ; at the end

englishextra opened this issue · comments

bootstrap-dropdown.js when minified with JSMin::minify produces error in Firefox error console saying clearMenus()needs ;

on line:

  clearMenus()
  !isActive && $parent.toggleClass('open')

if in source code this is corrected -- no error in minified version

commented

nope - that's a bug in jsmin. Probably should let @douglascrockford know about it though. thanks!

edit: The code had already been changed to an if when i suggested the jsmin issue be filed as a bug. Bootstrap and jsmin play very well together.

That is insanely stupid code. I am not going to dumb down JSMin for this case.

TC39 is considering the use of ! as an infix operator. This code will break in the future. Fix it now. Learn to use semicolons properly. ! is not intended to be a statement separator. ; is.

commented

i have learned to use them, that's why there isn't one present.

i have learned to use them, that's why there isn't one present.

Zzzzing!

Any language with syntax arguments is clearly broken, compilers deal with this. Dart, I guess.

if you really wanted to get rid of the semicolons (though I really don't see the point of that, is it really that bad that it's worth worrying about it?), ! ... && in this context an be replaced with ... ||.

coffeescript ftw?

otherwise, if you're doing real javascript, do it right?

p.s. (I'm not a coffeescripter yet, but it looks more and more like the right tool every day)

i have learned to use them, that's why there isn't one present.

Wow. I've read @fat's reasoning for not using semis, but when it comes to actual problems cropping up in the real world, why does "aesthetic" preference take precedence? Why write something like

!function( $ ){
...
}( jQuery )

just to avoid placing a semi a the end?

! is clearly not meant to do this job. It's a bool operator. Does the fact that the symbol looks prettier really matter?

I am well aware that you can hack your way around this and keep saying "nuh uh!" instead of admitting that it's ill conceived and improving, but seriously: making a snippy response like that just makes you look like an immature hipster smarting off to a battle worn professional. @douglascrockford is on the technical committee for fuck's sake.

This has nothing to do with being a hipster, and I have no idea why anyone seems to think it does. The simple fact is this code runs on ALL browsers without issue. Regardless if the fact that X version of javascript somewhere in the Y future will stop supporting it (maybe) does NOT give a reason for a javascript minifier to NOT correctly minify it.

Also if Crockford thinks this is insanely stupid code and he is on the technical committee then why is this insanely stupid code even possible?

I know who @douglascrockford is but who is this @fat fellow?

Also if Crockford thinks this is insanely stupid code and he is on the technical committee then why is this insanely stupid code even possible?

Being on the technical committee in 2012 for a language initially created 16 years ago probably doesn't grant him authority to radically change things like that.

@zacstewart Jacob wasn't trying to snippy, he was responding directly to one person's aggressive remarks. Taken out of context I can understand how it might look that way, but side-by-side, there's no issue there.

All Jacob pointed out was that this is a bug in someone else's code and that guy comes in guns blazing instead of speaking calmly and objectively? I call bullshit on the whole situation. If semicolons aren't required, then we don't need to include them. It's as simple as that.

The simple fact is this code runs on ALL browsers without issue. Regardless if the fact that X version of javascript somewhere in the Y future will stop supporting it (maybe) does NOT give a reason for a javascript minifier to NOT correctly minify it.

Forcing unwanted paradigms has no business in code reviews.

Tools that reformat code can break code if the code is dependent on whitespace. Javascript is dependent on whitespace due to semicolon insertion. Javascript minification is not part of the language. So the code is correct for the author and they should not use a tool that breaks it.

I agree that the code runs and my first statement speaks to the freedom of an author to do as they wish. The freedom to code as they see fit. Those are compelling reason to NOT change it. However, the reality is that very few individuals will use the code unminified and the question of "correctness" falls to common convention as a matter of pragmatism. The middleground is to add a semicolon for general use of the code. Branch it and have a nice bootstrap-dropdown-minification_safe.js - There's nothing wrong with changing the code as you see fit to meet your needs.

Do not demand to change a tool because you want to use the tool in a way another author has explicitly said they will not support. That's hypocrisy. That's why people are getting upset.

Learn to interop with existing toolset folks! This is a ridiculous debate.

Semicolons ARE the recommended practice... not just from Crockford, but also in Google's JS style guide: http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml#Semicolons

@eligrey - line break or not, Javascript never ends a statement if the next token is an infix or bracket operator. See http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml#Semicolons for some possibly surprising examples.

So if ! becomes an infix op, then newline + ! will no longer be equivalent to ; + !.

nope - that's a bug in IE. Probably should let @billgates know about it though. thanks!

Do you agree with this?

While I agree that JSMin can be improved for this case, but you also :)

If anyone is curious about the TC39 proposed syntax for the ! infix operator, here it is

Disagree with Mr. @fat approach: you distribute the code to developers and don't want to listen to good practices that are advised. I would have refactored the code when I had faced complaints from the users.

Thanks to the stand-off on this issue, I have to maintain my own branch of Bootstrap with semicolons inserted so that it minifies gracefully. Keeping my repo in sync is not fun at all, so I'm deploying out-of-date versions with my apps.

Given how much pain making production use of Bootstrap was, it felt like a version 0.2, not 2.0.

Clearly JSMIn isn't changing. That means Bootstrap can either add semicolons, or have people run into this issue again with JSMin. That's stupid, just use semi-colons.

Also, being a hugely popular library, people who have never developed a thing in their life are probably going to learn from bootstrap code - and emulate it. Then this newbie is screwed. Some brave soul decides to get his idea into the real world, finds bootstrap as it's the best thing out there for making beautiful apps, seeks to modify things, and picks up bad habits. Embracing bad habits is a dis-service to the whole JS community.

That's not cool.

Newbies are going to use bootstrap. They are going to learn from bootstrap.

Don't use JSMin with this project. Write documentation for newbies explaining why they shouldn't use JSMin. Don't tell the maintainer he has to do x or y for his own project. Fork it if you feel strongly enough to change the code.

@fat shouldn't change his code to work with JSMin and @douglascrockford shouldn't change his code so bootstrap can work with it. Just document why it doesn't work and move on?

Agreed, if you're making a general purpose tool like Twitter Bootstrap, make it as compliant as possible and use good practices.

Don't be a JavaScript hipster. Add semi-colons.

This is JavaScript. Relying on implicit insertion of semi-colons is stupid.

This minifies just fine via Rails' asset precompiling - I've never ran into an issue with it. IMHO, this is my issue with JavaScript as a language being much too flexible and forgiving.

tl;dr: use Coffeescript if you don't want semicolons.

Semicolonless Javascript is an ego-stroking attempt at rejecting standards for the sake of rejecting standards, not for the greater benefit of the community. While the need for hacks exists just to get around using semicolons, the practice does greater harm than good. "Use semicolons at the end of a statement" is a far simpler rule than "never use semicolons, except sometimes you have to use x hack, like prefixing with a !." All this for the benefit of an opinionated aesthetic? I propose that one might as well use Coffeescript instead, if the intent is prettier code by standards set as a lack of syntactic symbols.

Or, just write clean, standard (as defined by not just the specification, but as defined by the developer community) Javascript, if it is to be shared, used, and contributed to by the greater community.

@douglascrockford: Regardless of whether you consider this usage of ASI a bug, it'd be ignorant not to acknowledge that there certainly is a bug in JSMin.

At the end of the day, the repo maintainers can do whatever they please. We're not paying to use Bootstrap. They can include ASCII fingers all over the place if it makes them happy. If we don't like it, we can use something else or fork it. That said, I still think this discussion is valuable (minus the aggression), as these sorts of conversations get people thinking more deeply about code standards and how they fit into our everyday work as developers.

commented

Even though a semicolon might be 'better'. The syntax is correct, and jsmin should NEVER change or break working code.
Period. so either stop using jsmin, or start fixing jsmin.

@ChadMoran I believe he's talking about putting the ! in front of that code.

@ChadMoran I think the point is function(){...}(); vs !function(){...}()

/* Title: Immediate functions
Description: syntax that enables function execution as soon as it is defined
*/

(function () {
console.log('watch out!');
}());

//alternative with less parentheses
!function () {
console.log('watch out!');
}();

// reference
// http://www.jspatterns.com/
// http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate

commented

The point of using C syntax is to have ";" and "{" "}" to make sysntax and flow intend obvious to other programmers. This code is not obvious to other programmers (its not to me) so fix it by adding ";" on the end of expressions. Thanks.

I don't think talking this much about a semicolon is worth it.

Does refusing to use a semicolon make the code go faster? NO
Does it make the code harder to read and understand? YES
Will it break in the future? Probably
Does it have the bigger potential for future bugs? YES

Semicolon insertion was a mistake in JavaScript, along with eval, with and function scoping. People should be avoiding these instead of abusing them.

Semicolons are better for readability: if I see a diff, I know exactly where the line ends.

I take it you really read ecmascript262 (and I assume you did because you use it as an excuse for the bad practice of omitting semicolons) then you should realize that JS grammar is ambiguous. It's particularly ambiguous where it's about what constitutes a statement if you omit a semicolon. Browsers implement heuristics when trying to parse it (a fancy word for guessing) and as a result don't always agree between each other. Because humans aren't very good at parsing a context-sensitive grammar and executing an approximate state-machine and if/else decision tree to figure out if something is a statement or not, we punny humans tend to do it wrong every once in a while, even if we're extremely well versed and hold the entire JS grammar in our heads (which would be a considerable feat).

Fortunately, there's a "fix" for this lamentable human condition. The fix is just to insert semicolons, even though technically it's not required in all cases. But I promise you, the time wasted writing out that semicolon is more than compensated by the time you will not spend hunting down heisenbugs due to browsers differing understanding of statements, the time not spent trying to make your JS code compatible to all JS-manglers (like JSmin, closure compiler etc.), the time not spent arguing in favor of an outdated and obviously bad practice with random people on the internet AND the time not spent fixing all your code when a browser implements a newer revision of JS.

Hello everyone,

I've forked JSMin and implemented the desired behavior: https://github.com/shawnpresser/JSMin

It scans for "newline [whitespace] exclamation" and replaces the newline with a semicolon.

I hope this proves useful to someone (perhaps to the authors of Bootstrap). It was a fun project.

@shawnpresser This means deploying your version of JSMin on all my systems, plus ensuring your version is in sync with upstream JSMin.

Why can't we instead just replace all \n! with \n;! in Bootstrap? It's easier and doesn't affect production environments.

Writing JavaScript without semicolons is like doing all of your HTML in quirks mode, with improper nesting, unclosed

  • tags, and unquoted attribute values.

    Just as HTML was designed so that a webpage would still probably look ok even with a sloppy idiot writing markup in HotDog, JavaScript was designed so that people writing code in Notepad would still probably get something workable if they forgot a semicolon here and there.

    Doesn't make it the "right" way to do it.

  • @shawnpresser that's wonderful, can you please implement it as well for the YUI compressor, googles closure compiler, dean edwards packer and microsoft ajax minifier?

    Having experience using Bootstrap 1.4 on a large JS application, I can tell you that Bootstrap (1.4 at least) falls apart when uglified.

    Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ~Martin Fowler

    Couldn't @douglascrockford's JSMin just output an explanatory fatal error in this case, for the reason outlined in the third reply here?
    All programs that pass JSMin would still be syntactically intact. And JavaScript non-wizards (like me) would not sit there with broken code produced from two parts which we thought we could rely on.

    (And a big thanks to unknown for deleting all the meme/boobs.gif crap replies!)

    @pyalot I could try.

    #401

    "fat: The reason it was closed is because semicolons were added to the end of lines in 1.4. In 2.0 we removed them again when we introduced the downloader as it safely concats and minifies these files for you. I'm adding semicolons to the end of files in 2.0.1 - which will likely be released tomorrow, to support this mobile oddity."

    commented

    “Be liberal in what you accept, and conservative in what you send.”

    commented

    @shawnpresser Your fork does not minify this example correctly:
    if (confirm('Are you sure?') &&
    !false)
    {
    alert('ok');
    }

    @lcdt fixed; thanks.

    tl;dr Someone finds bug in JSMin, people that use Bootstrap (for free) make demands and lecture the authors about the one true way to write JavaScript.

    +1 to @istvan-antal @ajacksified @pyalot
    Egos does not do any good to community. When you are a library developer, sometimes you have to go with the not so nice implementation to support as many users as possible. If you just don't want this, then, don't share your code, remove it from GitHub, and continue close-sourced. The main goal of open sourcing, sharing, GitHubbing... is being open to real facts. Javascript uses semicolons, everywhere. Its like the issue on leaving a comma at the end of an array definition in javascript. Its valid, but... IE breaks. So, just delete them.
    (I can't imagine this people getting married )

    @madrobby TL;DR two tools are incompatible to each other with each author claiming what they do is the one true way. However one tool (JSmin) is deployed across the entire JS ecosystem at countless locations site authors have no influence whatsoever, and the other is ignoring sage advice from one of our elders, you decide!

    P.S. we now also have a gazillion forks of JSmin and bootstrap, both of which are virtually useless for different reasons. If you fork JSmin you'd have to convince everybody in the foodchain to use the forked JSmin or you're still gettting screwed at places you have no choice about, and the bootstrap forks would have to keep up with the primary upstream (bootstrap) or they're quickly getting to a derelict unmaintained state.

    What is with this new group of JS developers that refuse to use a semi colon? You're idiots. Use the semi colon like you're supposed to do.

    The solution to a problem like this is very simple. Project maintainers need to consider who the target audience for their project is, and maintain their project in such a way as to properly set and meet the expectations of that target audience.

    I would imagine that the target audience for Twitter Bootstrap generally:

    • doesn't know the rules of JavaScript ASI
    • doesn't know how to choose the right tools
    • doesn't understand how to debug errors in the tools they use
    • needs all the help they can get

    Which means that it might be a good idea to consider:

    • adopting a coding style that does as much as possible to help keep them out of harm's way
    • documenting things the project does that might not conform to their expectations
    • making explicit recommendations on tools and processes

    Ever since I started actually teaching JavaScript, I've learned a lot about how to help reluctant JavaScripters (read: the 99%) read and write code. Omitting all semicolons except where absolutely necessary for proper ASI definitely doesn't help them.

    Also, when responding to a user issue like this one, consider the first list. The user doesn't know what tool they should be using. The user doesn't know what's really going on. They've most likely inherited some arcane stack of tools that they can't discard, and need all the help they can get.

    (and passing the buck isn't really "help")

    Looking for a technical solution ("just use semicolons everywhere") is not going to help with a social problem (reluctance to properly learn JavaScript).

    Also, regarding the setting of expectations, one of the most prominent headers on the Twitter Bootstrap homepage is Designed for everyone, everywhere.

    Just in case there was any confusion as to whom this project was designed for.

    documenting things the project does that might not conform to their expectations

    Like mentioning in the INSTALL or README that th script MAY NOT be compatible with this or that minifier.

    Would sound like a compromise solution to all three parties -- the Bootstarp,the JSmin and some developper.

    But it isn't. Have to keep my own readme.txt for every library with notes upon their potential bad behavior then implementing into production.

    @madrobby that's pure arrogance. What about people in the process of "properly learning" Javascript?

    @madrobby funny you should say that because I always considered "properly learning javascript" to involve reading the spec, subsequently being horrified about the ambiguity in statement interpretation and henceforth using semicolons. Obviously there's a different level of comprehension, the one which doesn't read the entire ecmascript262 and stops at the paragraph about 1/4th down in the document that states semicolons are optional, but doesn't actually make it down to the grammar.

    @madrobby Are you seriously implying that users of either JSMin or bootstrap shouldn't be making recommendations to the authors of said libraries? Come on now... that's how open source works.

    Crockford, while abrasive and aggressive, has pointed out that bootstrap has a high likelihood of breaking in the future with in standard JavaScript if they continue to use a specific "style". The point being that relying on ASI (a set of rules that change, at least according to TC39) is not as reliable and future-proof as just using semicolons. Presenting it as an argument about the "one true way" is spurious. Here we have someone who, for better or worse, is helping shape the future of JavaScript telling someone their code will break, and that advice being ignored. For what reason? So the code looks pretty? This isn't about the "one true way"... this is about saying that using semicolons is a best practice, because it'll mean your code has a better chance of staying semantically correct in the future.

    +1 semicolons.

    Apart from the semicolon issue, what's wrong with signifying your intent in your code rather than abusing the logical operators:

    if(!isActive) {
        $parent.toggleClass('open');
    }
    

    It's a tough issue either way. If Crockford changes JSMin to accept this input, JSMin is helping devs write code that'll possibly break in standard JS in the future. If he doesn't, he'll be not accepting input that works in all flavors of JS right now.

    Reason to use semicolons - code will work properly and people will be able to get work done.

    Reason not to use semicolons - aesthetics and ego.

    Are you adults or children?

    Entertaining thread :) You clearly have first world problems. Come on, it is just some extra characters which is also best practice. Not fixing a problem that you otherwise could in 2 seconds is not very smart move for whatever reason.

    For the folks out there using Django compressor, see this issue: django-compressor/django-compressor#237

    +1 semicolons

    You guys are all really angry lol...

    It's simple, you want a semicolon there. Fork the repo and add it yourself and shut your mouth. Problem solved.

    It's fat's choice, and let it be. Don't try and shove your ahole lectures on why semicolons are used in herpy derps javascript library therefore must be used in everyones.

    There are plenty of forks that solve this problem, or you could just open notepad and add one at this spot.

    Nobody has any right of demanding someone who does something for his free time to change anything (assuming Twitter doesn't sponsor this, which I don't think they do?). If you have a problem with it, that's why they invented open source... so you can download it and add myfacesmells_ to the beginning of every variable.

    Semicolon insertion is a backup... a bonus.... relying on it is insanely stupid.

    @dubcanada, Twitter does not sponsor it, as per Mark and Jacob's words in some other thread.

    If you have pigeon shit on your shoulder and I dare to mention it to you then you can say that "Hmm, I see it but it looks good there, I also know that pigeon, his name is Dave, now move on." or you can just say "Thanks dude, I didn't notice it".

    Btw you are right there should be a different branch called "Twitter bootstrap (with semicolons)"

    Here, I'll fix this thread:

    s/insanely stupid/potentially incompatible and therefore not advised/g
    s/dumb down JSMin/allow JSMin to accept input that goes against TC39 because it might break future compat/g
    s/learn to use semicolons properly/please start using semicolons, as that will help ensure future compatability./g

    Add the stupid semicolon already. The longer the delay, the more painful it will become.

    Or just use UglifyJS? I don't recall it having problems with that issue.

    It's not painful to fat. He doesn't give a crap... it's painful to the morons in this thread trying to force him to add it, rather then just adding it themselves when they download.

    Also saying that some possible change in the future might break this is stupid. That's like saying you shouldn't use X function in php because it may be deprecated in 2020. Or you shouldn't use any HTML5 attribute because the spec is not done and it might change.

    Regardless of whether semicolons are best practice or not, the fact jsmin is breaking existing, functional non-minified code is a flaw.

    It also works with http://slimit.org/ I believe and http://slimit.org/ is actually smaller then jsmin.

    Both are positives!

    Or you could just not minify your javascript, in this day and age with the amount of bandwidth we all have. It really would not be a big deal.

    @dubcanada , why so angry? I personally don't care if bootstrap adds the semicolon. I can easily add the semicolon myself. What I care about is other people having their stuff break because neither crockford nor fat are willing to budge here.

    The advice I gave about future compat might be a case of YAGNI, or it might not be. Only time will tell. But look at the possible outcomes:

    Crockford adds support: 1. Accept input that may break in the future. 2. Accept more input that works right now. 3. Crockford acknowledges that while it's harder and potentially riskier to not use semicolons, it's still perfectly valid right now, and his tool should just be minifying, not enforcing a standard (that's what JSLint is for).

    Fat adds semicolon: 1. Have your code be potentially more future-proof. 2. Make your code work with JSMin. 3. Bow to the practice that adding semicolons increases compatability with existing tools and is easier than not using semicolons.

    Neither budges: 1. Other forks must be constantly maintained to add semicolons to make it work with JSMin, or otherwise abandon JSMin as a reliable minifier.

    I personally think @fat should just add the semicolon given the options above. If you disagree, fine, but it doesn't make either of our arguments stupid.

    @DBounds I think you might want to try http://slimit.org/. I think it would successfully minify this, although I haven't tested myself.

    "Or you could just not minify your javascript, in this day and age with the amount of bandwidth we all have. It really would not be a big deal." @dubcanada

    Someone's clearly never heard of a mobile data plan, or lived in a country that doesn't happen to have one of the fastest pipes in the world.

    @Pewpewarrows

    Even on fast connections, minifying is important. Of course, other things should also be done for maximum increase in speed - minify, concatenate, gzip.

    @nallar Of course, I was just pointing out the obvious.

    Whether or not one agrees with ASI, it is in the current spec. Therefore, that JSMin does not support this line of code would make it non-compliant. Imagine if you used the same argument to try and get out of paying taxes? "That rule is stupid and I don't follow it"?

    Douglas Crockford, bless his soul, is known for not being overtly diplomatic. I don't think he should change JSMin because in my view that would be compromising "Crockford". However, that does make his product less universal -- and that's good. People should be using JSMin because Crockford wrote it, not because it's expected to work everywhere. The idea is that if JSMin doesn't work on a given codebase, it's probably because Crockford wouldn't approve of that codebase -- and if that's important to you, then you know what to do: avoid Bootstrap!

    Then again, I have to wonder if this battle of integrity is worth losing potential Bootstrap users. Besides, it wouldn't be too hard to prefix punctuation on the beginning of newlines with ; -- a technique often employed by proponents of ASI. Changing the code to ;!isActive would satisfy concerns while having neither person sacrifice on their ideals.

    EDIT: or just do what @jed below me says, which is smarter. I think the world would run a little smoother if we all felt, ASI and semicolon users alike, that punctuation on the beginning of a new line that doesn't have a semicolon in front of it is a code smell in javascript.

    i'm 100% with @fat on the semicolons, but don't understand the benefit of writing the very fragile

    !isActive && $parent.toggleClass('open')

    when

    isActive || $parent.toggleClass('open')

    is shorter and

    if (!isActive) $parent.toggleClass('open')

    is clearer, and neither break as easily.

    @fat shouldn't be adding a semicolon because it makes the codebase too big.
    People keep complaining "Boo hoo hoo, twitter is so bulky and laggy!", and then they contradict themselves by requesting the codebase get larger with needless semicolons. smh, people these days....

    @fat You opened this as open source. When you do that you should be respectful of the people who will be using your code. That means adding semi-colons so we can all pick whatever minifier we want. But hey, i guess being a dick about the code you released as open source works too.

    @jed

    Object f has no method 'forEach'

    var foo = 'asdf'
    [1,2,3].forEach(function(value){console.log(value)})

    undefined is not a function

    var foo = function(){}
    
    (function(){
    })()

    number is not a function

    var foo = 1+2
    ('asdf' + 'blubb').toUpperCase()

    will compress wrong

    var foo = /asdf/
    console.log('here');
    var foo = function(){}
    var bar = function(){}

    Yes, @fat, if you give me a free sandwich, I DEMAND THAT YOU GIVE ME THE PROPER SERVING OF MAYONNAISE, as dictated in Proper Sandwich Specification JB-332. To withhold the proper serving of mayonnaise, as dictated by the sandwich community, clearly means that you are a dick, whereas I am a simple and humble masticator who's just trying to consume the sandwich that you handed me for free without any loss of mayonnaise taste that I desire. I shall toss your free sandwich aside until you give me the sandwich that I clearly deserve. After all, Douglas Crockford gave me a free sandwich, and it had exactly the right amount of mayonnaise and it creamed my mouth just right. The problem is obviously you, so hurry up and FIX MY FREE SANDWICH, and don't you dare ever try to hand me free food again without meeting these minimum sandwich specifications.

    @jed +1. Also, @nkwiatek, you're right. I think you've just reversed my opinion. Also, David Herman, another TC39 member, has indicated that TC39 will not be breaking existing code.

    In this case, @douglascrockford should support this correct code, even if it's against his preference, or he shouldn't call it a JS Minifier, he should call it a "Douglas Crockford Flavored JavaScript minifier".

    But also, @fat should change the code in the way @jed suggested. A bit of compromise on both sides so we can move on already.

    @pyalot none of which appear in the offending snippet. let's stay on topic.

    "...making a snippy response like that just makes you look like an immature hipster smarting off to a battle worn professional."
    "You're idiots. Use the semi colon like you're supposed to do."
    "Are you adults or children?"
    "But hey, i guess being a dick about the code you released as open source works too."

    Really?

    What's immature are the needless personal attacks against @fat over a coding style.

    @kitcambridge No, he released it as open source. Being disrespectful to the developers using it and then other developer's tools because it doesn't work with your code is wrong. It's not even about if he likes semi-colons or not or his coding style. It's open source. Be nice to the people who are using your code for god's sake.

    @nkwiatek

    As far as I can see, JSMin doesn't claim to follow the spec - it claims to work on what jslint says is ok. I think http://slimit.org/ works on the spec, although I haven't tried it. I believe the reason JSMin doesn't is to make it smaller(and faster!).

    @ryangrahamnc

    Can't tell if serious. If you are... a minifier gets rid of a newline character instead... and much more. Otherwise, carry on! :)

    @MatthewDL Telling developers who are legitimately trying to use your code that they just dont know how to use semi-colons and that everyone else needs to work around their coding style is wrong in the open source world. It's about working together not trying to boost your ego.

    @MatthewDL If you want to talk about "sandwiches" and how it relates, it'd be like giving away a free one (great!) and when they ask for a napkin you respond with "well, I know how not to spill it on myself, maybe you should learn to not make a mess on yourself too."

    @nallar

    Just a minor correction on my previous comment - apparently https://github.com/mishoo/UglifyJS is good.

    In his talk at at JSConf, @fat basically stated that he sometimes uses semicolons, and sometimes doesn't, and that he omits semicolons from Bootstrap in a deliberately enigmatic attempt to troll the community...

    Mission accomplished!