AST macros
David B. Held
dheld at codelogicconsulting.com
Mon Mar 19 22:54:48 PDT 2007
Daniel Keep wrote:
> Walter,
>
> I've just been going back over my old (and now fairly crusty) coroutine
> implementation, and realised that macros could make these a *major*
> feature of D.
>
> Ideally, I'd like to see a syntax like this:
>
>> coro showfiles(char[] msg)(char[], char[]) // <-- input,output types
>> {
>> char[] path;
>> while( (path = yield) != null ) // <-- yield is a protected method
>> {
>> writefln("%s: %s", msg, path);
>> }
>> }
> [...]
I thought Tango had Fibers?
Dave
More information about the Digitalmars-d
mailing list