Promize/A+

Created on 2022-01-29T22:38:25-06:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

Promises/Futures are something which is fired off and has an indeterminate value until completed.

A promise is fulfilled when a value is determined.

A promise is rejected if that value is an error.

A `then` method associates a callback to when the promise is fulfilled or rejected.

NB in languages like Nim or Io there may be an async scheduler instead which pauses a thread until the future is complete replacing it with the error or value. Promise/A+ is specifically a NodeJS/javascript specification.