michaelficarra / CoffeeScriptRedux

:sweat: rewrite of the CoffeeScript compiler with proper compiler design principles and a focus on robustness and extensibility

Home Page:https://michaelficarra.github.com/CoffeeScriptRedux/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

question: will you be re-introducing <class>.name?

tony-kerz opened this issue · comments

reference:
jashkenas/coffeescript#2052

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2268292-question-will-you-be-re-introducing-class-name?utm_campaign=plugin&utm_content=tracker%2F33145&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F33145&utm_medium=issues&utm_source=github).
commented

No, this is a non-writable property

ok, how about any way to retrieve the class name of an instance?

commented

Add a propertyName

Adding __name__ to the constructor, just like __super__, would be great for building class hierarchies. Currently, these issue all say to just create our own property in the instance or prototype. Yes, that works, but it becomes tedious and isn't DRY, and so more prone to errors.