Skip to content

Instantly share code, notes, and snippets.

@gkmngrgn
Created October 11, 2011 08:28
Show Gist options
  • Save gkmngrgn/1277567 to your computer and use it in GitHub Desktop.
Save gkmngrgn/1277567 to your computer and use it in GitHub Desktop.
Coffee Compilation
# Copyright (c) 2011, the <your_company> project authors. Please don't see the
# AUTHORS file for details. All rights reserved. Use of this source code is
# governed by a BSD-style license that can be found in the LICENSE file.
# Simple test program invoked with an option to eagerly
# compile all code that is loaded in the isolate.
# VMOptions=--fuu_dart
class HelloCoffeeTest
test_main: ->
console.log "Hello, Coffee man!"
new HelloCoffeeTest().test_main()
(function() {
var HelloCoffeeTest;
HelloCoffeeTest = (function() {
function HelloCoffeeTest() {}
HelloCoffeeTest.prototype.test_main = function() {
return console.log("Hello, Coffee man!");
};
return HelloCoffeeTest;
})();
new HelloCoffeeTest().test_main();
}).call(this);
@sztomi
Copy link

sztomi commented Oct 13, 2011

Guys that code is generated. If anything is worth discussing it is why the coffeescript compiler does that...

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