-
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 option to enable function names #1459
Comments
What debugger are you using? The ones I'm aware of work fine without the functions being named. They get the name from context. |
Nope -- CoffeeScript wants to generate JavaScript that runs correctly everywhere, not JavaScript that runs correctly in most places, but then fails in mysterious ways in IE. |
Define "everywhere". When I'm writing Node.js code, it's already limited to only running via Node.js. It will fail to work in any other context. Node.js doesn't use the IE engine. Given this, why should my Node.js code be restricted based on limitations in IE? I recognize the value of having the default output of CoffeeScript work in all JS engines, but it's obviously the case that not all code is going to care about this property. CoffeeScript already has a -b flag in order to behave better when writing Node.js modules. Is it really that unreasonable to ask for another flag that instructs CoffeeScript that I don't need IE compatibility? |
@kballard: the CoffeeScript compiler has a single compilation target right now. In order to support a flag that changes the compilation target form this available-in-all-major-JS-implementations subset of JS to which we currently compile, we would have to redesign a lot of the compiler to separate the code generation process from the AST structures themselves. I plan to do this with my compiler, but that won't be available for quite some time now. |
Perhaps a year later? |
I know function names are disabled because of an IE bug (#366), but I'm targeting node.js with my script and I would absolutely love to have function names for debugging purposes. Could we possibly get an option to turn function names back on when compiling/interpreting a script, if we know we will never be executed by IE?
The text was updated successfully, but these errors were encountered: