Re: EcmaScript Proposal – Private methods and fields proposals.
Waldemar Horwat
waldemar at google.com
Tue Apr 17 20:20:10 UTC 2018
On 04/16/2018 05:47 PM, Sultan wrote:
> >An instance has a fixed set of private fields which get created at object creation time.
>
> The implications of this alternative does not necessarily limit the creation of private fields to creation time, for example writing to a private field in the constructor or at any arbitrary time within the lifecycle of the instance.
That would contradict your previous answer to the hijacking question.
> >How do you deal with inner nested classes wanting to refer to outer classes' private fields?
>
> Not sure i understood what you mean by this?
Class B is lexically nested inside class A. You want to refer to one of A's privates from within B's body.
Waldemar
More information about the es-discuss
mailing list