[META] Function implementation hiding proposal
Categories
(Core :: JavaScript Engine, enhancement, P3)
Tracking
()
People
(Reporter: alex.fdm, Unassigned)
References
(Blocks 1 open bug, )
Details
(Keywords: dev-doc-needed, meta)
The proposal is currently in Stage 2.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Thoughts:
-
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?
-
-
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.
-
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.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
The proposal is now called "Function implementation hiding", updating the bug title and link accordingly.
Reporter | ||
Updated•4 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 3•9 months ago
|
||
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?
Comment 4•6 months ago
|
||
This should still stay open, it is still a Stage 2 proposal in TC39.
Description
•