3 ms·
Can you compare/contrast with Fluture? https://github.com/fluture-js/Fluture https://github.com/fluture-js/Fluture
by gyrgtyn 9y ago
Can you compare/contrast with Fluture? https://github.com/fluture-js/Fluture https://github.com/fluture-js/Fluture
- Mitranim 9y agoThanks for the suggestion. I wasn't aware of Fluture. Will look deeper into it. On cursory inspection, looks like Fluture has multiple features that I rejected when designing Posterus: laziness/templating, separation of map/flatmap, and possibly others. They come at the cost of cognitive load and API surface. In contrast, Posterus aims to be the simplest Promise replacement you could possibly come up with, filling the main missing features: cancelation and scheduling control. Additional features come at a cost. Laziness & templating trips up unfamiliar developers. Separating map and flatmap doesn't make sense in a dynamic language; since you can't statically enforce it, it's just a tripmine with no benefit. Also, a large amount of utilities bloats the code size, which I care about very much. Posterus is designed to be as small as a typical promise polyfill, fitting into a size-constrained browser application. Needless to say, Fluture has features you might want that don't exist in Posterus. I'm not familiar with it, so it's difficult to recomment any.