On 10 July 2012 10:17, Russell Leggett <[email protected]> wrote:
> Yes, I think that arrays are likely the strongest case for ? on bindings.
> Something like this would be nice:
> let [first,last,?company] = contact.split(",");
>
Actually, I don't see how this is a case of "? on bindings". In fact, the
'?' would have to be interpreted as part of the array pattern syntax for
the above to make sense (in analogy to object patterns, it happens to be
associated with the implicit property name "2").
AFAICS, '?' on a variable itself would always be redundant, because a
variable pattern is irrefutable anyway.
/Andreas
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss