Skip to content

Instantly share code, notes, and snippets.

@remybach
Created May 3, 2013 13:36
Show Gist options
  • Save remybach/5509144 to your computer and use it in GitHub Desktop.
Save remybach/5509144 to your computer and use it in GitHub Desktop.
Coffeescript output annoyance
foo = 0
bar = 'baz'
// 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.
@remybach
Copy link
Author

remybach commented May 3, 2013

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.

@jjenzz
Copy link

jjenzz commented May 3, 2013

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

@jackfranklin
Copy link

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