Skip to content

rename "promise" to "future" (or "fncall"?) #858

@andrewrk

Description

@andrewrk

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.

  • await works on promise->T
  • resume and cancel works on promise
  • suspend gives you a promise->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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions