Re: EcmaScript Proposal – Private methods and fields proposals.
thysultan at gmail.com
Tue Apr 17 20:50:56 UTC 2018
>That would contradict your previous answer to the hijacking question.
Can you point out the contradiction? The private field is still being
written to by the providing class.
>Class B is lexically nested inside class A. You want to refer to one of
A's privates from within B's body.
Can you provide an example of what this looks like with the current
public/private fields proposals?
On Tue, Apr 17, 2018 at 11:20 PM, Waldemar Horwat <waldemar at google.com>
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss