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

Interaction with other proposals and use cases #20

Closed dead-claudia closed 5 years ago

dead-claudia commented 5 years ago

I know of a couple points where this could integrate with:

I feel these two scenarios should probably be considered to some extent and maybe appropriate hooks made. The infrastructure to do this already generally exists with this proposal, so I'm just suggesting that in addition to allowing source-controlled function hiding, it should also lay a common groundwork for other reasons you shouldn't/can't have function sources exposed.

ljharb commented 5 years ago

Engines already can opt to omit all source from any or all functions, unrelated to this proposal - there’s an implementation hook.

dead-claudia commented 5 years ago

Where? If so, I can close this issue. (I assume you're referring to somewhere in the spec.)

ljharb commented 5 years ago

https://tc39.github.io/ecma262/#sec-hosthassourcetextavailable

dead-claudia commented 5 years ago

Okay, then this is probably moot then.