[OT] Stackless fibers/coroutines
Chris Wright via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 25 10:06:25 PDT 2016
On Sun, 25 Sep 2016 12:39:21 +0200, Jacob Carlborg wrote:
> On 2016-09-24 17:49, Nick Sabalausky wrote:
>> 2. Compared to C, D has much stricter rules about where a switch's
>> "case" labels can do. Ie, they can't really cross scope boundaries. So
>> *all* the coroutine's "yield" statements would have to be within the
>> same scope *and* at the same nesting-level (or at the very least,
>> there'd be some big annoying restrictions). Otherwise, when it gets
>> converted to a "case:", the resulting code would be invalid.
>
> Do you have any examples?
Duff's device works, so case labels can cross scope boundaries.
More information about the Digitalmars-d
mailing list