It wouldn’t be breaking if it was the only identifier that one was allowed to 
use multiple time, right?

But I do like the idea of the dot. Would be nice for destructuring arrays, too:

let [., ., third] = myArray;

On Dec 30, 2012, at 13:01 , Andreas Rossberg <rossb...@google.com> wrote:

> On 30 December 2012 12:50, Axel Rauschmayer <a...@rauschma.de> wrote:
>> It would actually be nice to have that as a feature: If the variable name is
>> `_` then it can be used multiple times. It’s a nice, self-descriptive way of
>> saying that you don’t care about a parameter value.
> 
> That underscore wildcard is the exact syntax used in functional
> languages, and very useful, I agree. In JS, that syntax would be a
> breaking change, unfortunately. But we could use something else (e.g.
> I proposed '.' in the past).
> 
> /Andreas
> 

-- 
Dr. Axel Rauschmayer
a...@rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to