3 ms·
I am a bit saddened to see so many languages adding sugar for promises (or the equivalent abstraction in that language). Promises are just a monad and async/awa
by harpocrates 10y ago
I am a bit saddened to see so many languages adding sugar for promises (or the equivalent abstraction in that language). Promises are just a monad and async/await is a poor mans version of Haskell's do notation. Exactly the same amount of syntactic overhead (actually a tad bit more, since async/await are longer than do/<-), but significantly less expressive. Sigh.
- ajeet_dhaliwal 10y agoI agree, the sugar is pouring in from every crack and hole, how many ways do we need of doing the same thing. Sometimes the sugar is a genuine productivity booster and you don't want to be a Luddite but recently, in JS it seems it's coming faster and faster and that's why it is so important, whether you are working individually or as a team, to choose a subset of language features you will use to keep sane. No one likely agrees with me but I always found callbacks are more readable for my brain than code rewritten to use promises, so may be this new way is something I might actually like in use! Select your flavor of sugar.