Created
January 22, 2012 01:23
-
-
Save slant/1654908 to your computer and use it in GitHub Desktop.
Language comparisons
This file contains hidden or 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
| thing = { | |
| say: function(something){ return something; } | |
| } | |
| document.write(thing.say('hello')) |
This file contains hidden or 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
| class Thing: | |
| def say(self, something): | |
| return something | |
| print Thing().say('hello') |
This file contains hidden or 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
| class Thing | |
| def say something | |
| something | |
| end | |
| end | |
| puts Thing.new.say 'hello' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment