#Are there any agreed differences between Tasks, Promises and Futures?

1 messages · Page 1 of 1 (latest)

vale ruin
#

So JS has promises, Elixir Tasks. Other languages have futures. I consider all of them "a value coming later" and that they can be represented as a monad.
Essentially I think they are all the same thing. Is that the case?

Context is I am interested in making a task library that works on erlang and JS and eventually being able to share references to tasks between client and server.

foggy halo
#

The difference I’ve seen between tasks and promises is that promises self-resolve even when not used while futures need to be run and so will do nothing if dropped

#

Task is think is more vague a word

vale ruin
#

Interesting. I wonder if self-resolve or not makes any difference on them fulfilling the monad laws.

#

I don't think it should

foggy halo
#

Nah it doesn’t