Replies: 1 comment
-
Hear hear. About the return type though: what do we gain from explicitly naming it in the continuation generic, as it is already part of the proc signature for the cps function. Having it in two places requires me to repeat myself, and will just cause errors when the cps func return type does not match the type from the generic. Also, I might want to use the same generic Cont type for different cps functions with different return types. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is the basic idea:
...in which
data
is the user-supplied type that will hold continuation state which the user can play with. We will expose this thusly:The
Spell
type will still get extended to add locals, but we can already see a few improvements with this:data
between continuations at rendezvousfn
,mom
, etc.)Now, my question is, how/where do we handle the return value? We could add it dynamically like we do the rest of the locals, but would you rather specify it as a generic?
I think this is much more along the lines of what we're after.
Beta Was this translation helpful? Give feedback.
All reactions