-
Notifications
You must be signed in to change notification settings - Fork 111
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
experimental commit: derive names for function expressions when we can #131
Conversation
Related issues: * jashkenas/coffeescript#15 * jashkenas/coffeescript#366 * jashkenas/coffeescript#758 an many more. See also https://github.com/jashkenas/coffee-script/wiki/FAQ Any objections before I merge this into `master`?
So I guess it doesn't harm on IE ? Could be possible to change |
Looks good to me. It will probably help a lot with debugging; making stack traces more readable :) It's also good to know that a minifier like UglifyJS can get rid of the unnecessary function name for production code:
The built-in Redux minifier leaves it as a named function expression though (maybe a missing option to esmangle?):
Now that i look at it, the minified output also omits the |
I thought jeremy vetoed this because it didn't work in IE. |
He veoted |
I hope I don't have to try to find something in coffeescript issues, On Sun, Dec 30, 2012 at 4:30 PM, Nami-Doc [email protected] wrote:
|
@mark-hahn: The related issues are all linked in the linked FAQ. I'm pretty confident I understand the IE bug. It has been around and well known for quite a while. var f = function g(){}; behaves like this in IE6: function g(){}
var f = g; So the name edit: Also, |
Sorry. I somehow missed the beginning of this thread. |
@epidemian: I think you've stumbled upon an esmangle bug. I've reported it and it is linked above. |
@mark-hahn actually, it's fairly easy :p |
I'm going to close this because of general FUD and because I don't want this change affecting the merge into jashkenas/coffee-script. |
Hey Micheal, FWIW I thought of a cleaner way to name object methods: Module.method = function Module_method() {}; The |
Related issues:
and many more. See also https://github.com/jashkenas/coffee-script/wiki/FAQ
Any objections before I merge this into
master
?