Closed dominicbarnes closed 9 years ago
I guess this is the way that the community is moving haha. I still don't really understand what promises give us other than maybe async/await, but I'm pretty sure that could be built on top of thunks which is a simpler, more functional API.
-1 from me.. promises feel bloated and awkward
@stephenmathieson I still lean toward what you are saying. However, I think it is worth pointing out that if we use promises, it's possible to support both plain callbacks and generators, which I think is a big win. (especially considering the weird transition period we find ourselves in between node 0.10 and node 0.12/iojs)
don't we already support generators and callbacks? https://github.com/duojs/duo/blob/0.10.0/lib/duo.js#L410
Yeah, we do in duo itself, but I'm specifically talking about other internals like gh-resolve
and duo-package
.
i don't think we need to worry about how we consume internal APIs, espcially because it's already working just fine. also, it doesn't look like anyone else uses gh-resolve :p
Yeah, I can get behind that. Haha, I think I've just been really frustrated with the --harmony-generators
flag lately.
just use iojs
:p
Yeah, I do that on all my personal stuff now, but I'm stuck with mostly 0.11 at work atm. :P
co@4+
now allows yielding promises, and I think we have the opportunity to allow better interoperability if we switch a lot of our current "raw" generators into regular functions that simply return promises. (then consumers could use either callbacks or generators)I think at the top-level, duo can continue to use generators since it's byfar the most complex repo. But a lot of internals like
duo-package
,gh-resolve
, etc could very easily be converted.