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

Pull request created for 1.0 vs. 1.1 diffs. #85

Closed
wants to merge 68 commits into from
Closed

Conversation

domenic
Copy link
Member

@domenic domenic commented Mar 11, 2013

This was the quickest way of creating the diff requested here.

Use this pull request to make line-by-line editorial comments!

briancavalier and others added 16 commits December 6, 2012 22:33
- Separate out "promise" and "thenable" concepts.
- Specify that "exception" just means "value".

The first of these helps greatly with the ambiguity of defining exactly what a promise is, versus the operational definition of a "thenable" as something that a promise consumes and assimilates if returned from a handler. The second helps clarify #65.
It looked pretty out of place among the rest of the terms.
This more fully specifies the manner in which thenables must be assimilated, which is useful both for clarity and for usage in future specifications, e.g. specifying the behavior of `resolve` in a promise-creation spec.

The recursive nature of the thenable assimilation is a change from the current specification; see #75 for more details.
This allows passing a third parameter, e.g. with an `onProgress` forwarder. Fixes #83.
Just discovered Promises/A+ specification, and updated node-fate to comply with test suite.
1. If `x` is not a thenable, `promise` must be fulfilled with `x`.
1. If `x` is a thenable, run `Assimilate(promise, x)`.
1. If/when `rejectPromise` is called with a reason `reason`, `promise` must be rejected with `reason`.
1. If both `resolvePromise` and `rejectPromise` are called, or multiple calls to the same argument are made, the first call takes precendence, and any further calls are ignored.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "precendence" -> "precedence"

domenic and others added 9 commits March 15, 2013 02:13
Review is taking place at https://github.com/promises-aplus/promises-spec/pull/85/files. Comments incorporated:

- Specify that values include thenables.
- Specify that `thenable.then` is called with `thenable` as `this`.
- Fix a typo.
Add when 2.0.0 to implementations
This helps specify how you should get a reference to the `then` method, test it, and then call that same reference, as discussed in #88. I think it also makes the spec rather more elegant.
The strategy is to reject `promise` with the thrown exception as the reason. Fixes #87, fixes #88.
Per comments from @erights in #84, this makes it clearer that the procedure is an abstract specification device and not a real JavaScript function.
@lsmith
Copy link
Contributor

lsmith commented Jun 4, 2013

Alternate wording for resolution of thenables proposed in #124.

domenic and others added 24 commits June 7, 2013 03:01
- Move `promise1 !== promise2` non-requirement to "Omissions" from "Additions".
- Add `onFulfilled` and `onRejected` called as functions requirement (new in 1.1) to "Additions".
- Change "returns a promise" to "returns a thenable", and expand upon what has been added (i.e. the resolution procedure).
- Use "reason" instead of "rejection reason".
- Rewrite the "Clarifications" section for better structure and clarity.
- Add "thenable" to the list of things we clarify.
New intro, and other textual revisions
Closes #108; see some good discussion there. They will now be treated as any other cycle.
See discussion starting approximately at #108 (comment). Thanks to @erights for making this distinction clear.
Incorporates @couchdeveloper's Objective-C implementation (closes #114).
…langs

Separate out implementations in other languages
Fixes #129 by prohibiting `onFulfilled` and `onRejected` from being called before the promise is respectively fulfilled or rejected. An example of behavior the current spec allows would be for an implementation to call `onFulfilled` or `onRejected` once, even on a promise that remains pending forever.
Helps clarify that Promises/A+ is a JavaScript spec. Fixes #135.
- Add that we prevent `onFulfilled` or `onRejected` from being called too early.
- Add that we improved the introductory text.
- Add more explanation of the Promise Resolution Procedure.
- Separative changes into informative and normative.
Add SHXPromise to implementations
@domenic domenic closed this Sep 29, 2013
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

Successfully merging this pull request may close these issues.