[Arrow function syntax] Move Arrow to head to fixArrowFormalParameters issues

François REMY fremycompany_pub at yahoo.fr
Wed Jun 1 10:38:35 PDT 2011


Last time I asked, it was the "#" char that was wanted for private names. If 
"#" has been replaced by "@" in private names, then we can replace "@" by 
"#" in my proposal, and return to the original proposal of #functions. If 
private name uses both @ and #, I raise *severe* concerns about it. Since 
special ASCII chars are scarce, as you said, it seems unappropriate to use 
two of them in a single module of Harmony, removing to all other modules 
(and future proposals) the possibility to use these symbols. Beside that, 
private names are great but not necessary.

BTW, you could use -> for private names. If I remember correctly my C 
lessons, the -> operator is used to access members. You could use it for 
private names, it would fit very nicely.

    function setPrivateProperty(obj, value) {
        private prop;
        myObj->prop= value;
        return private->prop;
    }

    var obj = {};
    private prop = setPrivateProperty(obj, true);
    obj.prop // undefined
    obj->prop // true

Regards,
François



-----Message d'origine----- 
From: Brendan Eich
Sent: Wednesday, June 01, 2011 6:45 PM
To: François REMY
Cc: Sean Eagan ; es-discuss
Subject: Re: [Arrow function syntax] Move Arrow to head to 
fixArrowFormalParameters issues

On Jun 1, 2011, at 9:17 AM, François REMY wrote:

> It seems you're rethrowing the -> vs the @ syntax debate. (replace -> by @ 
> in your proposal, you'll get the initial proposal I did)

@ is wanted for private names.

There's no need to go a bikeshed- or snipe-hunt for coveted, scarce single 
ASCII characters.

/be= 



More information about the es-discuss mailing list