Private Names in 'text/javascript'

Allen Wirfs-Brock allen at
Thu May 19 08:09:32 PDT 2011

On May 19, 2011, at 3:04 AM, Andreas Rossberg wrote:
> Hm, making name creation a method of String seems equally odd --
> unless you also plan to have typeof String.createPrivateName() ==
> "string".

That is indeed the plan in the particular version of the proposal that started this thread.

> Of course, I see the concern with the global object (although 'Name'
> was only a strawman suggestion). I assume that we need a future-proof
> solution for adding new built-in objects anyway, most likely based on
> modules. And that accessing built-in objects through the global object
> will be deprecated in Harmony code. So, since private names will be
> Harmony-specific, their constructor doesn't have to be visible through
> the "old" ES5 global object.

This thread initially was specifically about how to make private name creation available in code that does not opt-in into new Harmony syntax.


More information about the es-discuss mailing list