@name

Jussi Kalliokoski jussi.kalliokoski at gmail.com
Thu Mar 15 09:25:01 PDT 2012


Still not sure if I like this, but I wanted to point out that there's no
syntax conflict between @ as a 'this' and 'this.' shorthand and obj. at name,
as far as I can tell.

The only weirdness would be this:

this. at name

vs

@@name

Otherwise they seem to conflict no more than object literals, labels and
conditional operators. Is this correct?

On Thu, Mar 15, 2012 at 6:03 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:

> On Mar 15, 2012, at 7:30 AM, Kevin Smith wrote:
>
> Hi Allen,
>
> In this stawman<http://wiki.ecmascript.org/doku.php?id=strawman:private_names>,
> private members are accessed using obj.name, where "name" can be a
> private name that is in scope.  Why was this strategy abandoned?
>
> kevin
>
>
> There was significant negative feedback on this list WRT that version of
> the proposal.
>
> See the long thread starting at
> https://mail.mozilla.org/pipermail/es-discuss/2010-December/012299.html and
> other related threads in December 2010.
>
> It would probably be a good idea for me to go back and re-read all of
> those threads, but main recollection of the main issues were:
>
> 1.  Many people believed that the parallel name spaces for variables and
> private names was too confusing:
>
> private x;  //declare x as a private name
> function (p,x) {  //declare x as a parameter, it does not shadow private
> name x
>    p.x = x;             // .x resolved using private name scoping, RHS x
> resolved using normal declaration scoping
> }
>
>
> 2. Many people (not necessarily the same people in all cases) did not like
> the fact that the existing identify:
>
>      obj.name
> is always equivalent to:
>      obj["name"]
>
> was lost.
>
> There did not appear to be any chance of consensus forming around this
> proposal so backed of to the current, much simpler private name proposal
> that does not have a |private| declaration (and hence introduces no new
> scoping issues) and which only supports obj[nameValuedExpression] as a
> syntax for accessing private named properties. The idea was to make the
> proposal as simple as possible so we could get agreement on it.
>
> Allen
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120315/4c2ebf16/attachment.html>


More information about the es-discuss mailing list