Private Names and Methods

Brendan Eich brendan at
Thu Apr 5 11:23:03 PDT 2012

Kevin Smith wrote:
>     Even if defined outside, within a module, the private name should
>     always be within reach.
> But then it's part of the external interface of the class (or object 
> or whatever).  You don't want to have to increase the surface area of 
> your abstraction just to refactor out common implementation code.

No, in the example Axel showed, the private name is block-scoped and 
does not leak. Same goes for a module: you'd need to export the binding. 
Or so I've thought -- do you see another way the name could leak?


More information about the es-discuss mailing list