rainforestapp / decaf

Coffeescript to ES.next transpiler. Now maintained over at
https://github.com/juliankrispel/decaf
MIT License
106 stars 10 forks source link

Make better use of scope #75

Closed juliankrispel closed 8 years ago

juliankrispel commented 8 years ago

Making better use of the Scope object as provided by coffee-script could help with a couple of issues:

It would also help me shy away from introducing my own object-oriented abstraction. I'd like to keep the code as simple as possible for as long as possible.

juliankrispel commented 8 years ago

This change will probably enable me to fix #7 #6 #65 in one go.

juliankrispel commented 8 years ago

So the way I was thinking using the Scope object was that I basically mirror the way it is used in CoffeeScript which is thus:

juliankrispel commented 8 years ago

Scope could also be used for keeping track of superMethodNames which would fix #82

I'm so looking forward to getting rid of meta.superMethodNames it's such a dirty hack

juliankrispel commented 8 years ago

Having tried to use scope for this I'm doubtful that it is such a good idea. It's pretty gnarly ... and highly dependent on how the scope object is built up inside nodes.coffee. There's a lot of mutation going on, change a single thing and everything collapses...

juliankrispel commented 8 years ago

addressed in #93