Skip to content

Instantly share code, notes, and snippets.

@Spaceghost
Created February 17, 2014 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Spaceghost/9055820 to your computer and use it in GitHub Desktop.
Save Spaceghost/9055820 to your computer and use it in GitHub Desktop.
Why I hate Coffeescript.
a = undefined # var a;
a = "lol" # a = 'lol';
rawr = (-> # rawr = function() {
a = "wat" # var a = 'wat';
a # return a;
).call() # }.call();
console.log a # console.log(a);
# returns 'wat' # returns 'lol'
# What the fucking fuck, Coffeescript...
@Spaceghost
Copy link
Author

@ajmurmann, it's showing that coffeescript doesn't use var within function definitions. They don't like var.

// Generated by CoffeeScript 1.7.1
(function() {
  var a, rawr;

  a = void 0;

  a = "lol";

  rawr = (function() {
    a = "wat";
    return a;
  }).call();

  console.log(a);

}).call(this);
// Generated by CoffeeScript 1.7.1 with --bare
var a, rawr;

a = void 0;

a = "lol";

rawr = (function() {
  a = "wat";
  return a;
}).call();

console.log(a);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment