Skip to content

Replacing the "resolve" verb #9

@domenic

Description

@domenic

Here is our terminology problem with current libraries:

  1. We have fulfilled, rejected, and pending as three mutually-exclusive states. Everyone is reasonably happy with those names.
  2. We want a name for the operation operation(x) coupled to promise p where if x is a non-promise value, p becomes fulfilled with x, and if x is a promise, p adopts its state, either immediately or eventually. Currently this is called "resolve."
  3. We want a way of talking about the two "not pending" states as a single entity. Currently this is called "resolved."
  4. The problem is that if you "resolve" a promise as per 2, it does not become "resolved" as per 3.

Let's use this thread to think of replacements for the verb in 2, assuming that we keep the state name as of 3.

Ideas so far:

  • "designate": designate(x) causes p to designate whatever x designates.
  • "adopt": adopt(x) causes p to adopt x's (possibly eventual) state
  • "become": become(x) causes p to become x. (Problem: cannot use transitively, i.e. "become p with x" is awkward.)
  • "yield": yield(x) causes p to yield to x's value. (Confusing with upcoming yield keyword.)

No ideas that jump out at me so far... anyone got anything better?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions