[Arrow function syntax] Move Arrow to head to fixArrowFormalParameters issues
brendan at mozilla.com
Wed Jun 1 11:58:01 PDT 2011
On Jun 1, 2011, at 11:53 AM, François REMY wrote:
> Ok, then I'm fine with it. Please note that the current strawman still make use of the # symbol, which is why I thought you were using both of them in a future proposal.
You must be reading an older strawman. The one promoted to Harmony last week is
and it adds no new syntax, just semantics with API.
> Anyway, what do you think of my “–>” proposal for private names?
No one wants to use the C/C++ pointer to struct member operator for something quite different. OTOH @ is one char and (with a restricted production for the binary operator) can be used as a unary prefix operator for "this@" shorthand when accessing private instance variables in methods in a class.
> It also release a special char (#,@, or whatever char you wanted to use) for other uses, since private->name works pretty well and is very consistent with obj->property. I'm not sure that @.name
That's not a going proposal, nor is #.name -- the whole "private x;" declaration form, which implies a new static binding chain for identifier uses on the right of dot in member expressions and left of colon in object initialisers, was a bit controversial (even though aspects of it resurface, e.g. in scoped object extensions).
Private name objects are in Harmony without syntax. But classes need syntax for method access to private instance variables. This is the big open issue to resolve quickly for classes to stay in Harmony.
More information about the es-discuss