Closed juliankrispel closed 8 years ago
It's pretty bad, though, because you could do stuff like this:
class A
@set = (key, value) -> @[key] = value
@set 'log', (message) -> console.log('A says', message)
@log 'foo'
@eventualbuddha the feature in itself is pretty bad. I'm thinking about just throwing an error telling the user to fix
In coffee-script it's entirely legal to just have random statements inside a class definition.
This is what the compiler spits out:
The only idea I have for this so far is to also wrap the es6 class in a self-invoked function