You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the biggest problems now is knowing where async transitions happen. Is there a way to better communicate this through language constructs? e.g., instead of
varpromise=…promise.then(functionf(){});
We could have
varpromise=…promise.then(continuationf(){});
This has several benefits as I think about it:
The notion that a function takes a “continuation” as an argument (instead of a function), makes it explicit in code where the transition occurs.
The “link event” can be updated to happen precisely when a “continuation” is created, thus the link happens closer to user code, vs buried deep inside some library.
We can better enforce async-transition semantics/correctness by having a clear distinction between a function and a continuation. E.g., we could assert that a continuation is invoked in a seperate context than where it was created.
Now, this has implications on the language, which means it’s a bigger deal, but it’s such a fundamental concept that I wonder if it makes sense to pursue this. Nice thing is above is easily transpile-able & thus has a nice back-compat story.
The text was updated successfully, but these errors were encountered:
One of the biggest problems now is knowing where async transitions happen. Is there a way to better communicate this through language constructs? e.g., instead of
We could have
This has several benefits as I think about it:
function
and acontinuation
. E.g., we could assert that a continuation is invoked in a seperate context than where it was created.Now, this has implications on the language, which means it’s a bigger deal, but it’s such a fundamental concept that I wonder if it makes sense to pursue this. Nice thing is above is easily transpile-able & thus has a nice back-compat story.
The text was updated successfully, but these errors were encountered: