Closed michaelficarra closed 8 years ago
I think this is a good idea personally. Since implementations do this already it would be good to require it. I wouldn't be surprised if this is actually a web-reality requirement.
What should be done about %GeneratorFunction%, %TypedArray%, and other intrinsics that are not exposed as globals? Should we just add a Global Name field for them? It's not referenced anywhere else.
What should be done about %GeneratorFunction%, %TypedArray%, and other intrinsics that are not exposed as globals? Should we just add a Global Name field for them? It's not referenced anywhere else.
I would support that. It's also consistent with the majority (Edge being the odd one out): https://jsfiddle.net/d0521eko/
I would also support mandating some actual string for these built-ins. However I don't think we can call it global name as that would be confusing as it's not reachable from global like the others. Throwing this out there, but what about another column that is "friendly name" or something and the spec text uses either the global name or else the friendly name (and assert that one of these will exist)?
Then I think this should probably happen as a separate effort. @bterlson Do you think it would have to go through the full proposal process or could it just be submitted as a PR to tc39/ecma262 later?
@michaelficarra I'm not sure it should be a separate process. These friendly names only need to exist for F.p.toString to do something with them, so seems best to include them in this proposal?
Fixes #9. @gibson042 let me know what you think.
Regardless, I'll wait for reviewer/editor approval of this PR before merging it since it's not important to me.