tc39 / proposal-function-implementation-hiding

JavaScript language proposal: function implementation hiding
https://ci.tc39.es/preview/tc39/ecma262/pull/1739
MIT License
98 stars 7 forks source link

Why not censor all functions, or at least cross‑module functions? #12

Closed ExE-Boss closed 6 years ago

ExE-Boss commented 6 years ago

IMHO, the result of calling Function.prototype.toString() on non‑native implementations is a bafflingly dumb idea, as it reveals the inner workings of third party code, which should’ve been encapsulated.

This issue would make it so that the inner workings of all functions would be hidden, thus avoiding the concerns of #10 and #3 entirely.

domenic commented 6 years ago

This sounds like a separate proposal, that would have different semantics and consequences to this proposal. For example, it seems backward-incompatible with the current web. Is that correct?

ExE-Boss commented 6 years ago

For example, it seems backward-incompatible with the current web. Is that correct?

Possibly.

domenic commented 6 years ago

OK. I'm not interested in championing a proposal that would be backward-incompatible with the web today, so I'll close this.