-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add named classes that work in use strict
.
#2262
Conversation
The patch looks good. Waiting for this fix to be applied since I extensively "use strict". |
+1 for that ! |
Thanks, but no thanks, for all the reasons detailed in the original ticket. We don't want to mint a new "standard" JavaScript property that works for |
@jashkenas then why do we have P.S. |
Dynamic programming? I don't think that term means what I think you think it means. edit: Ah, I haven't heard this usage of the term before. Damn my algorithmic background! |
@michaelficarra yea, didn't know about this one. Won't be using it in the future in the context. edit: ✌️ |
coming in late on this, but the lack of a class name property is a real shame for me too. |
I too would love to see some classname property; we too use it to auto-detect types. |
Coffeescript generated code will throw an exception (only in Safari for now) if you use
The property in question is Whatever the solution you want to come up with, it is a problem with coffeescript that would be nice to fix. Coffeescript should play nicely with 'use strict'. |
Should be fixed in the latest version of CoffeeScript. |
@karellm coffeescript doesn't generate .name since 1.3.3. |
Thanks for the prompt answer. That must be the Edit: Actually was up to date but I needed to edit the files to regenerate them. |
This will allow use of
@constructor.__name__
for building great dynamic apps.CoffeeScript 1.3.1 already uses
@constructor.name
for this purpose, but as we've seen, it breaks'use strict'
mode because@constructor.name
is a read-only property.Related: #494, #2052, #2249, #2250, f3a1f46.