How about replacing <| with ->

Herby Vojčík herby at mailbox.sk
Sun Mar 4 09:18:45 PST 2012



John J Barton wrote:
> On Sat, Mar 3, 2012 at 11:17 PM, Brendan Eich<brendan at mozilla.org>  wrote:
>> Dean Landolt wrote:
>>> Does it /have/ to be ascii?
>>
>> Does it have to be grawlix? I proposed
>>
>>   let sub = sup beget {p:1, q:2, r:3};
>
> The problem with<| and friends is that the common mental association
> with these symbols do not describe the operation. That is also true
> for 'beget'.   |sup| begets |sub|, not {p:1, q:2, r:3};
>
> The operator needs to be mentally associated with the formation of a
> compound object from parts:
>     let sub = sup joins {p:1, q:2, r:3};
>     let sub = sup backs {p:1, q:2, r:3};  // as in table-lookup
>     let sub = sub with {p:1, q:2, r:3};     // I heard this one was unemployed
>     let sub = sup injected-into {p:1, q:2, r:3};
> If we agreed to call the operator something like "injected-into", then
> suddenly the arrow starts to make sense.
>
> jjb
>
>> a while back, and we discussed alternative contextual keywords. Grawlix
>> appears to result in (a) strong anti-grawlix reaction from a good part of
>> the community; (b) no consensus on which cuss-characters to use.
>
> I'm not a fan of funky syntax, but I think a bigger problem in this
> particular case is our inability to articulate the operation being
> discussed in a short phrase. Recall we discussed this before and tried
> out "setPrototypeOf" etc. Nothing stuck. That's why the cuss words are
> easy ;-)

I've got no problem to see what operation it is, "create derived (eg. 
ancestor) entity".

So from above proposal, only "backs" seems like having good meaning. I'd 
say:

     let sub = sup derived {p:1, q:2, r:3};

Herby

P.S.: Maybe even
     let sub = sup offspring {p:1, q:2, r:3};

P.P.S.: I don't know what 'beget' means (I know I can find it, just to 
illustrate it's not a commonly known word).


More information about the es-discuss mailing list