please add orEqual operator

Isiah Meadows isiahmeadows at
Mon Aug 10 23:30:07 UTC 2015

The original idea was a default assign operator, like CoffeeScript's `?=`.
And the idea of testing multiple values is currently best done with
`switch` statements. I would love a simpler alternative, though. (This is
something that engines could simply desugar, though, much like default
arguments and rest arguments).

Although, to be honest, I'm seeing a lot of things on this list lately that
really imply a need for patten matching and data types.

On Mon, Aug 10, 2015, 17:07 Tab Atkins Jr. <jackalmage at> wrote:

> On Mon, Aug 10, 2015 at 1:53 PM, Brendan Eich <brendan at> wrote:
> > Please search for older proposals on You'd find
> >
> >
> >
> > ES6 parameter default values took a look of wind out of this one's sails.
> You're pattern-matching incorrectly - this is not the default
> operator, it's "seeing if a var is any of several possible matches".
> But yeah, as Alexander said, Python gets by just fine by creating an
> array or tuple and asking about membership; using [].contains() should
> be just fine in JS too.
> ~TJ
> _______________________________________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list