Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why callback, errback? #3

Closed
Raynos opened this issue Nov 13, 2012 · 3 comments
Closed

Why callback, errback? #3

Raynos opened this issue Nov 13, 2012 · 3 comments

Comments

@Raynos
Copy link

Raynos commented Nov 13, 2012

Why not

when(eventual, function (err, value) {
    // do stuff
})

It's idiomatic to node and trivially composes with callback-reduce

@Gozala
Copy link
Owner

Gozala commented Nov 13, 2012

No, that requires handling errors at every step and is not idiomatic promise API either. There is lower level await if you want to handle things at each step.

@Gozala Gozala closed this as completed Nov 13, 2012
@Raynos
Copy link
Author

Raynos commented Nov 13, 2012

What about adding a new method.

goodName(eventual, function (err, value) {

})

So that you can use promises as an implementation detail of a library and then still support a node style callback interface

@Gozala
Copy link
Owner

Gozala commented Nov 13, 2012

Alternatives to existing API will only do harm. I also don't see any specific reasons for adding this alternative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants