domenic at domenicdenicola.com (2014-08-26T18:24:10.673Z)
> ```js
> function* gen(a, b, c) first {
> ...
> }
> ```
>
> Not bikeshedding, some found it ugly or too terse, many wondered about
> other future syntax vying to go after the parameter list. But the idea
> seems good.
Cool. Although this solution isn't going to be *that* much better, because
it will necessitate uncomfortable branching to deal with first iteration
vs. subsequent iterations.
On the other hand, something along the lines of:
function *echo() input {
while (true) yield input.value;
}
doesn't have the same problem.
> > > > function* gen(a, b, c) first { > ... > } > > Not bikeshedding, some found it ugly or too terse, many wondered about > other future syntax vying to go after the parameter list. But the idea > seems good. Cool. Although this solution isn't going to be *that* much better, because it will necessitate uncomfortable branching to deal with first iteration vs. subsequent iterations. On the other hand, something along the lines of: function *echo() input { while (true) yield input.value; } doesn't have the same problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140820/0a7e3ca4/attachment.html>