Hacker News new | ask | show | jobs
by Cloudef 825 days ago
I wrote implementation of "javascript promises" for c++ that is still used by the company. It needs event loop implementation for platform to work (few lines of code usually), but other than that it works pretty well. However, nowadays I probably would instead use coroutines, promises while cool the callbacky catch / then API isn't very nice. One difference to JS promises is that I implemented cancel-ability.