Kevin Smith wrote:


    I've been thinking about ways to explicitly place the initial
    yield.  One ideal is a reserved keyword sequence starting with
    'yield`, such as `yield continue` to mark the initial yield point.
    If a generator function does not contain an explicit `yield
    continue`, then it is implicit at the start of the function body.


So when the generator function is executed (and before next has been called), it will run until the `yield continue` (or somesuch), instead of stopping at the start of the function body?

That would be great, actually.

Except it's an oxymoron: the continue does not mean no-pause-at-this-yield, and the proposal abuses the keyword otherwise used only with loops.

Also, write your echo generator this way. You have to duplicate code.

/be


_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to