Created
May 3, 2013 13:36
-
-
Save remybach/5509144 to your computer and use it in GitHub Desktop.
Coffeescript output annoyance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo = 0 | |
bar = 'baz' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The coffeescript output is: | |
var bar, foo; | |
foo = 0; | |
bar = 'baz'; | |
// But JS engines do hoisting anyway, so I would *prefer* it to be this for | |
// the sole purpose of readability when debugging: | |
var foo = 0, | |
bar = 'baz'; | |
// ... but that's just me being a massive pedant. |
I'm not sold on CoffeeScript either but then I've never used it... I used HAML and it put me off that sort of short hand syntax shizzum for LIFE ha
If you write in a language that's being compiled to JS, why care about the JS? Especially as it all ends up minified in the end anyway ;)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's also worth noting that I'm not entirely sold on CoffeeScript - I'll use it if I have to, but don't see the benefit of using it given the choice.