3 ms·
I think my problem with this approach is the way it throws away the functional programming paradigm JS has been sharpening over these last few years. When I see
by dclowd9901 10y ago
I think my problem with this approach is the way it throws away the functional programming paradigm JS has been sharpening over these last few years. When I see await, I'm reminded of Java or .net, languages that didn't traditionally have functions as first class citizens.
OTOH, I can't complain about removing dependencies like "when" or "bluebird", and it'll be nice to not have to simulate promise returns in testing.
- dvlsg 10y agoI think it's nice to have both options. I prefer the functional style of chaining promises for the most part, but there are definitely a few times when await is easier to use IMO (awaiting inside of a loop, for example).
- Bognar 10y agoI don't see how it throws away the functional programming paradigm. This is basically Haskell's do-notation applied to JS Promises.