3 ms·
Fantasy Land is a great project—proof of how extensible JavaScript can be. There are some very interesting related projects: https://github.com/Avaq/Fluture ht
by sotojuan 10y ago
Fantasy Land is a great project—proof of how extensible JavaScript can be. There are some very interesting related projects:
https://github.com/Avaq/Fluture https://github.com/Avaq/Fluture is basically lazy and better promises. A+ spec got nothing on this.
https://github.com/sanctuary-js/sanctuary https://github.com/sanctuary-js/sanctuary adds better typechecks, combinators, and types like Maybe.
https://github.com/origamitower/folktale https://github.com/origamitower/folktale An upcoming collection of similar tools for JavaScript.
And of course, there's Ramda.
I think these libraries may sound impossible to use at work at first, but if you play with them for fun, you can at least learn some cool techniques or paradigms.
- spion 10y ago> lazy and better promises. A+ spec got nothing on this Better how? Does it for example support unbounded recursion without stack overflow? function f(n) { if (n > 0) return Promise.resolve(n - 1).then(f) } Because promises do (there is no maximum n above) Also at a quick glance I see the following: > Be careful when cancelling a hooked Future. If the resource was acquired but not yet consumed, it will no longer be disposed This works in Bluebird; the resource will be disposed even if the promise is cancelled.
- wrong_variable 10y agoPromises are Eagar - it means it has the advantages of Eagerness. Being Lazy has the advantages of laziness which is that if you do not clean your room, you became a hoarder and your room overflows. The point I am making is that either of these tools are not holy grail. I do not think a solution for all is going to exist, just use them when it best suits the application - I think ( Like its just my dumb opinion ) also @spion I think we are going to take this argument to our death beds :D
- sotojuan 10y agoAgreed and I probably shouldn't have said native promises are bad. I think they're okay—flutures just work better with me and how I program.