Created
July 10, 2012 14:29
-
-
Save erkobridee/3083635 to your computer and use it in GitHub Desktop.
Teste de POO Herança simples em CoffeeScript
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
### | |
uma possível justificativa para utilizar o CoffeScript, ele possibilita codificar mais próximo do conceito de POO de linguagens como o Java, C#, ... | |
http://js2coffee.org/ | |
faça um teste na aba: CoffeeScript > JS | |
### | |
class ClassA | |
@att1 = "atributo 1" | |
@att2 = "atributo 2" | |
class ClassB extends ClassA | |
@att3 = "atributo 3" | |
send :(msg) -> | |
console.log msg | |
# veja o monstro que é gerado para representar uma simples herança. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment