Skip to content

Instantly share code, notes, and snippets.

@erkobridee
Created July 10, 2012 14:29
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 erkobridee/3083635 to your computer and use it in GitHub Desktop.
Save erkobridee/3083635 to your computer and use it in GitHub Desktop.
Teste de POO Herança simples em CoffeeScript
###
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