Bruno Jouhier (2013-06-14T15:12:09.000Z)
While playing with my little async/await library, I noticed that I was
often forced to parenthesize yield expressions as (yield exp) because of
the low precedence of the yield operator. Typical patterns are:

var foo = (yield a()) + (yield b()) + (yield c());
if ((yield a()) && cond2 ...) ...

Looks more LISPish than JSish to me.

The low precedence plays well with yield _statements_, as it lets you write
  yield a + b;
very much like you would write
  return a + b;

But it does not play as well with yield _expressions_.

The only solutions I can think of would be to have a different keyword for
yield _expressions_ (await?) with the same precedence as other unary
operators.

Anyway, this is only a small annoyance and I know it's getting late into
the game. But I thought I'd raise the issue anyway.

Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130614/957edab7/attachment.html>
github at esdiscuss.org (2013-07-12T02:27:38.045Z)
While playing with my little async/await library, I noticed that I was
often forced to parenthesize yield expressions as (yield exp) because of
the low precedence of the yield operator. Typical patterns are:

```js
var foo = (yield a()) + (yield b()) + (yield c());
if ((yield a()) && cond2 ...) ...
```

Looks more LISPish than JSish to me.

The low precedence plays well with yield _statements_, as it lets you write

```js
yield a + b;
```

very much like you would write

```js
return a + b;
```

But it does not play as well with yield _expressions_.

The only solutions I can think of would be to have a different keyword for
yield _expressions_ (await?) with the same precedence as other unary
operators.

Anyway, this is only a small annoyance and I know it's getting late into
the game. But I thought I'd raise the issue anyway.