tc39 / proposal-function-implementation-hiding

JavaScript language proposal: function implementation hiding

Home Page:https://ci.tc39.es/preview/tc39/ecma262/pull/1739

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

high-fidelity polyfill use case seems to impact error stack traces

misterdjules opened this issue · comments

When using the "hide source" directive to allow for high-fidelity polyfills, the impact would also be that those functions would appear only as anonymous in error stack traces. However it seems that native functions (e.g. Array.prototype.forEach) show up as ${some function name} anonymous.

Thus it seems that using the "hide source" directive could conflate two different use cases that are not necessarily both desirable at the same time for developers: allowing for implementing high fidelity polyfills, and hiding function names from error stack traces.

Is that intended, and if yes, why is that not an issue?

Sorry, this was unintended. Thank you for bringing it to my attention. I've updated the example from the README: 9c8d1d4. Are there any other places that need updating? The spec text in tc39/ecma262#1739 should already have been correct.

Are there any other places that need updating?

I don't think so, thanks for doing this 🙏