Brendan Eich (2015-02-23T19:28:59.000Z)
Benjamin (Inglor) Gruenbaum wrote:
> Of course this example is contrived! It's the simplest example I could 
> think of. I do think it stands for every example of any iterator that 
> takes any input from `.send` or `.throw`. I have plenty of other 
> contrived examples (implementing `fork` like this by using generators 
> for coroutines with promises is at least mildly cool).

I <3 fork, Unix kid here. Still, agree here:

> That said I absolutely agree that more practical examples are required 
> in order to make this already way-powerful two way protocol into 
> something even more complicated.

Another consideration beyond just the needs-justification language 
power-up -- the implementation burden goes up too. You're talking about 
cloning an activation. Easy in the unoptimized world of generators 
today, not so much in the future.

It may be worth it, but we need to feel the "back-pressure" from 
developers using generators, first.

Can developers use conventions and APIs to implement `clone` today? I.e.,

Object.defineProperty(function*(){}.prototype.__proto__, 'clone', 
{value: XXX, writable: true, configurable: true, enumerable: false});

What would have to go in the XXX that's self-hostable, and how would 
generators that participate have to be written?

/be
d at domenic.me (2015-03-06T00:37:49.653Z)
Benjamin (Inglor) Gruenbaum wrote:
> Of course this example is contrived! It's the simplest example I could 
> think of. I do think it stands for every example of any iterator that 
> takes any input from `.send` or `.throw`. I have plenty of other 
> contrived examples (implementing `fork` like this by using generators 
> for coroutines with promises is at least mildly cool).

I <3 fork, Unix kid here. Still, agree here:

> That said I absolutely agree that more practical examples are required 
> in order to make this already way-powerful two way protocol into 
> something even more complicated.

Another consideration beyond just the needs-justification language 
power-up -- the implementation burden goes up too. You're talking about 
cloning an activation. Easy in the unoptimized world of generators 
today, not so much in the future.

It may be worth it, but we need to feel the "back-pressure" from 
developers using generators, first.

Can developers use conventions and APIs to implement `clone` today? I.e.,

```js
Object.defineProperty(function*(){}.prototype.__proto__, 'clone', 
{value: XXX, writable: true, configurable: true, enumerable: false});
```

What would have to go in the XXX that's self-hostable, and how would 
generators that participate have to be written?