David Herman wrote:
On May 13, 2013, at 6:11 PM, Brendan Eich<[email protected]> wrote:
Merge next and send by letting next take an optional parameter? Ok by me.
+1
I pointed out to Dave that Python has arity checking and did next before
adding send in 2.5 for "coroutines", whereas JS has optional params
without arity checking, so folding send into next works.
Make yield* work on any {next, throw}, not necessary but ok by me too.
Yes with one delta: if there's no .throw it still works, it just defaults to (x)
=> { throw x }. This way you can write ordinary iterators without having to
worry about providing the default throw, and they still function properly as
generators.
+1 or more -- we should not invent new nominal types with stub throw
method implementations, people will not use them and they are
unnecessary boilerplate.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss