promises-aplus/promises-spec — pull request #89 by domenic (2013-03-15 06:47:05+00:00)
Title: Switch from "Thenable Assimilation Procedure" to "Promise Resolution Procedure"

This was prompted by #87 and #88, and in particular the discussions about how you should only retrieve a reference to `then` once, and then call that same reference.

This necessitated refactoring from "if `x` is a thenable, run the `Assimilation(thenable, promise)`; otherwise, fulfill `promise` with `x`"---which necessarily seems to involve a two-step process---to simply "run `Resolve(promise, x)`." I think it turned out rather nicely, actually.

A second commit tries to resolve the question of exception handling by treating something with a throwing getter for `then` as a non-thenable. It seems right to me, but I am willing to be persuaded in the other direction. I included it as a separate commit specifically because the refactoring is separate from the exact approach of how we handle throwing getters for `then`.