-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
Somebody suggested this and I think it might make sense.
Right now when you make an async function call, you get a promise->T. You can implicitly cast promise->T to promise.
awaitworks onpromise->Tresumeandcancelworks onpromisesuspendgives you apromise->T
It's kind of weird to "resume a promise" and "cancel a promise". It makes a little more sense to "resume a future" and "cancel a future".
This proposal is to change "promise" to "future". Another contender might be "coro" (short for coroutine). Another idea that I just made up is "fncall". It makes a lot of sense to "resume a fncall", "cancel a fncall", "suspend a fncall", and nobody is going to use fncall as an identifier.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.