please add x .= f()

Brendan Eich brendan at
Mon Aug 10 18:07:26 UTC 2015

Do not send "Please add" messages with two-line, half-baked sketches of 
extensions to the language. That's just injecting noise with very little 

The "-1" you received will be the answer if pressed from everyone on 
TC39, I would bet real money. Syntax is expensive, adding it for little 
semantic gain and some downside user-confusion risk (plus a small 
complexity tax hike for the language in full) is never the right answer.

That you can scratch this itch (and many others like it) via sweet.js 
does not argue for incorporating any such =. or .= operator into the 
core language. Analyze developer patterns and nearby languages for 
better candidate extensions that solve more serious usability or greater 


Florent FAYOLLE wrote:
> Hello,
>> x .= f() should be syntax sugar for x = x.f()
>> x .= f().g().h() should be x = x.f().g().h() 
> +1! I've made some weeks ago a prototype of this in sweet.js:
> Except that the syntax is rather =. (I have probably been influenced 
> by the CoffeeScript's existential operator). The reverse looks fine to 
> me too.
>> -1 Please no :)
> Why?
> Florent
> _______________________________________________
> es-discuss mailing list
> es-discuss at

More information about the es-discuss mailing list