Novel operator syntax

Brendan Eich brendan at mozilla.com
Tue Oct 29 16:30:54 PDT 2013


Brendan Eich wrote:
> Tristan Zajonc wrote:
>> What about +:?  This actually has some visual appeal if primary 
>> motivation is elementwise operations and is a syntax error with that 
>> ASI example.  The downside is that it can end up pretty close to 
>> existing syntax like {a+:1} vs. {a:+1}, although I don't expect that 
>> to be a common use.
>
> Yeah, that could work. We're unlikely to use : as a prefix operator 
> due to ?:, and even less likely (as in 0) as an infix operator (note: 
> not type annotation separator in declarations) due to labels.

Warming up to +:, *:, etc. Thanks for this suggestion!

/be


More information about the es-discuss mailing list