Trying to reproduce Node.js async waterfall pattern.. (Meta-programming)
Christian Beaumont via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jun 23 17:55:33 PDT 2014
Just an idea that popped into my head... Maybe I can use variant
for the input/output types? I haven't looked at it yet, so I'm
not sure what it does, or the performance costs.
I realized that because the final callback always gets called,
and the types of the intermediate steps may be different, there
is actually no way at all to define a completely uniformly type
safe final callback...
although the point is a little moot, because the only way you end
up in the final callback is either by an Exception or a Result
from the finalCallback - 1 step.
So you can actually never get both an Exception and a Result
More information about the Digitalmars-d-learn
mailing list