Hi,
I don't see the point of throwing an error when calling .next('foo') on
a newborn generator. We don't throw an error on .next('foo', 'bar'),
and unlike the case with most function calls there is no way to get the
'bar' when resuming a generator, as you don't have an arguments object.
I
I think we can settle this now.
Lets allow an argument.
On Tuesday, February 25, 2014 6:27:26 AM, Brendan Eich bren...@mozilla.com
wrote:
Andy Wingo wrote:
Hi,
I don't see the point of throwing an error when calling .next('foo') on
a newborn generator. We don't throw an error on
Linking to some Twitter discussion related to this:
https://twitter.com/bradleymeck/status/436371508005326850
On Thu, Feb 20, 2014 at 3:03 AM, David Bruant bruan...@gmail.com wrote:
Le 20/02/2014 06:39, Brendan Eich a écrit :
Bradley Meck wrote:
If I am reading the spec right (and I may
Le 20/02/2014 06:39, Brendan Eich a écrit :
Bradley Meck wrote:
If I am reading the spec right (and I may not be), only the generator
should fail? The first call to gen().next(value) must have value be
undefined, and the others do not check.
I thought we agreed at the January 28 meeting to
take for example a function that accepts an iterator:
```javascript
function test(name, iterable) {
try {
var iterator = iterable[Symbol.iterator]();
console.log(name,'with value for first next', iterator.next(1))
}
catch(e) {
console.error(name,'failed value for first next', e);
Bradley Meck wrote:
If I am reading the spec right (and I may not be), only the generator
should fail? The first call to gen().next(value) must have value be
undefined, and the others do not check.
I thought we agreed at the January 28 meeting to get rid of this error,
but I can't find it
6 matches
Mail list logo