3 ms·
This isn't related to the library, but promises in Javascript are much different than what I learned about promises in Scheme. In Javascript, promises seem to b
by davexunit 13y ago
This isn't related to the library, but promises in Javascript are much different than what I learned about promises in Scheme. In Javascript, promises seem to be about asynchronous operations. In Scheme (and other languages?), promises are used for lazy evaluation. Scheme provides the delay and force forms for this. Now I need to make sure that I don't get confused about this in the future.
- zeckalpha 13y ago> Now I need to make sure that I don't get confused about this in the future. Are you going to delay or force that?
- ufo 13y agoFor a functional programming analogy, JS promises are more like monads than about lazy evaluations. I don't know if there is a good Scheme analogy because in Scheme you can use call/cc and friends while in JS you are forced to write your async code in explicit continuation passing style (promises are just a way to make this a bit more manageable).