An "extend" operator is a natural companion to <|

Brendan Eich brendan at
Wed Jul 20 09:56:23 PDT 2011

On Jul 20, 2011, at 2:22 AM, Axel Rauschmayer wrote:

> Then lhs and rhs are switched, though. What is the best description of what this operator does? “Copy the own properties of an increment to an object”? Whatever word(s) are chosen as an infix operator should reflect such a description. “Extend” and even “increment” do not sound descriptive enough to me.
> More ideas:
>     obj <-copy- increment
>     obj from increment
>     obj loads increment
>     obj imports increment
>     increment to obj
>     increment increments obj
>     increment overrides obj

"increment" is confusing here, but I get it -- you mean the rhs in Allen's <& proposal. Best to use "source" or "src", "increment" suggests ++ and misleads.

I don't think we should use contextual keywords that aren't verbs for a mutating operator.

At this point I think a keyword operator is no better than a built-in method, especially from a built-in module, but even if just Object.extend.


More information about the es-discuss mailing list