4 ms·
Hey, author here! I definitely agree that Promises - and the whole async story in ReasonML - is pretty poor atm and ripe for improvement in the near future. I'
by lilactown 9y ago
Hey, author here!
I definitely agree that Promises - and the whole async story in ReasonML - is pretty poor atm and ripe for improvement in the near future. I'm not sure what you mean by, "remember to resolve them," though?
I've helped Wojtek Czekalski out a bit with a small library called vow[1] that provides a more type-safe way of using Promises in BuckleScript/ReasonML - it needs a bit clean up (update to new syntax, publish to npm) that I might do in the coming weeks. Nick Cuthbert has a PR for making it completely sound[2] that might land soon as well, which might change the API but provide even more safety.
[1] https://github.com/wokalski/vow/ https://github.com/wokalski/vow/
[2] https://github.com/wokalski/vow/pull/6 https://github.com/wokalski/vow/pull/6