CoffeeScriptRedux icon indicating copy to clipboard operation
CoffeeScriptRedux copied to clipboard

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

Open tony-kerz opened this issue 12 years ago • 5 comments

reference: https://github.com/jashkenas/coffee-script/issues/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).

tony-kerz avatar Mar 20 '14 10:03 tony-kerz

No, this is a non-writable property

vendethiel avatar Mar 20 '14 11:03 vendethiel

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

tony-kerz avatar Mar 20 '14 13:03 tony-kerz

Add a propertyName

vendethiel avatar Mar 20 '14 13:03 vendethiel

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.

drarmstr avatar Feb 04 '15 23:02 drarmstr

+1 @drarmstr

aurium avatar Mar 04 '15 22:03 aurium