Open Bug 1519482 Opened 6 years ago Updated 6 months ago

[META] Function implementation hiding proposal

Categories

(Core :: JavaScript Engine, enhancement, P3)

63 Branch
enhancement

Tracking

()

People

(Reporter: alex.fdm, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: dev-doc-needed, meta)

The proposal is currently in Stage 2.

Priority: -- → P3

Thoughts:

  1. It seems to me the motivation for this proposal is unusually weak, even for TC39.

    • The main justification for this is Angular abusing Function.prototype.toString. But the feature does not actually address that problem. It just puts a "break Angular" directive into the language. Maybe it should be called "punish the impure";. Or "use no evil";. :P

    • Also mentioned: Two polyfill authors have developed workarounds to trick _.isNative(). But we shouldn't add features to JS for the benefit of those two people, especially since they already have a way to fool _.isNative that works. So what problem is this solving, again?

  2. Setting aside the behavior change, developers (and compile-to-JS folks) will be interested in memory savings and that is probably the main reason (if any) they'll want to use this. But we currently retain source code on a per-script basis, not per-function, so if we implement this in the obvious way, they won't actually save any memory when using this directive in a function prologue.

  3. If we do in fact discard source, it would affect the debugger. Quality-of-life thing, but the devtools team will want to think about this, if this proposal sticks.

Summary: Implement the Function.prototype.toString() censorship proposal → Implement the Function implementation hiding proposal

The proposal is now called "Function implementation hiding", updating the bug title and link accordingly.

Summary: Implement the Function implementation hiding proposal → [META] Function implementation hiding proposal
Severity: normal → S3

The meta keyword is there, the bug doesn't depend on other bugs and there is no activity for 12 months.
:willyelm, maybe it's time to close this bug?

Flags: needinfo?(wmedina)

This should still stay open, it is still a Stage 2 proposal in TC39.

Flags: needinfo?(wmedina)
You need to log in before you can comment on or make changes to this bug.