This matches my initial perceptions of private properties in JS; exactly identical to regular properties but private, which I have not seen preserved in the other proposals.
> On Apr 13, 2018, at 4:38 AM, Sultan <[email protected]> wrote: > > The proposal is an explainer with regards to an alternative sigil-less syntax > to back private fields/methods. > > >What does private(this)[property] do? > > "private(this)[property]" and alternatively "private[property]" or > "private.property" all invoke access of a private "property" on the "this" > instance of the class, symmetrical to the syntax/function nature of both the > "super" and "import" keywords. > > >How do private fields come into existence? > > Unless i've misunderstood what is meant by "come into existence" the > proposals makes use of the reserved "private" keyword to define private > fields i.e "private id = 1". > > >What's private about private fields? > > Outside of a private fields provider class, private fields/methods would not > be accessible. > > >How do you prevent them from being forged or stuck onto unrelated objects? > > What do you mean by this? > >> On Fri, Apr 13, 2018 at 1:16 AM, Waldemar Horwat <[email protected]> wrote: >> I read that proposal but don't understand what the proposal actually is. At >> this point it's a bit of syntax with no semantics behind it. What does >> private(this)[property] do? How do private fields come into existence? How >> do you prevent them from being forged or stuck onto unrelated objects? >> What's private about private fields? >> >> Waldemar > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

