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

Return a deferred #2

Open
ForbesLindesay opened this issue Dec 21, 2012 · 1 comment
Open

Return a deferred #2

ForbesLindesay opened this issue Dec 21, 2012 · 1 comment

Comments

@ForbesLindesay
Copy link
Member

The way most current implementations work is by having a function which returns a 'deferred': {resolver, promise}.

The deferred concept is a little bit messy, but makes a fair bit of sense. One option would be to avoid calling it a deferred at all in the spec, and just use ES6 terminology:

let {resolver, promise} = defer();

There's also nothing to implementations providing other abstractions, in addition to this one.

@domenic
Copy link
Member

domenic commented Dec 21, 2012

I don't think avoiding naming it is a viable approach.

I agree that we can provide e.g. constructors per #3 alongside deferreds for no-nesting convenience.

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