On Mon, Apr 6, 2015 at 3:19 PM, Kevin Smith <[email protected]> wrote:
> Although not strictly ambiguous with conditional expressions, `fn ? ()`
> would require the use of YACG (yet another cover grammar).
>
> Also, what about computed property names? For example: `obj ?
> [Symbol.iterator]`. I'm not sure that even YACG will help here.
>
I have two thoughts:
1. Could the language allow for a prefix operator instead (AKA 'The Maybe
Operator'):
`?a.b` and `?obj()` and `?obj[Symbol.iterator]`
2. You could make the postfix operator `?.` which would be ugly but dodge
the above issues:
`obj?.()` and `obj?.[Symbol.iterator]`
- Matthew Robb
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss