Bug Tracker

Ticket #11395 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 20 months ago

Promises should use the term "fulfilled" instead of "resolved"

Reported by: trevorburnham@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc: jaubourg
Blocking: Blocked by:

Description

I had a discussion with Promises/A spec co-creator Kris Kowal recently, who blames himself for misusing the words "resolved" and "rejected" in a way that later came to be adopted by jQuery.

Currently, jQuery Promises transition from their initial *pending* state into either a *resolved* state (when the Deferred's resolve() method is called) or a *rejected* state (when the Deferred's rejected() method is called). There's no good term for a Promise that's been either resolved or rejected ("non-pending"?).

In the Promises/A spec and its implementations, what jQuery calls the *resolved* state is instead called *fulfilled*, and a Promise is said to be "resolved" when it's either fulfilled or rejected.

I would suggest that jQuery move in this direction by deprecating the resolve() method in favor of an alias named fulfill(), just as complete() was renamed to always(). Since this wouldn't affect backward-compatibility, it could be done immediately. In 1.8, the string returned by the state() method could be changed from "resolved" to "fulfilled", and the documentation could be updated to use the new terminology.

This would, in my view, greatly reduce confusion in the long term. I don't really care about jQuery deviating from the Promises/A spec (notably with then(); see #11010), but I do care about good terminology. To my mind, it makes a lot of sense to have two dichotomies: fulfilled vs. rejected, and pending vs. resolved.

Change History

comment:1 Changed 3 years ago by rwaldron

  • Status changed from new to closed
  • Resolution set to wontfix

This is just more surface area that is unnec. I'm going to close this as wont fix - if @jaubourg deems it highly important, he can re-open it.

comment:2 Changed 3 years ago by dmethvin

When the co-creator of Unix, Ken Thompson, was once asked what he would change about the OS, he supposedly said, "I would spell creat() with an 'e'." So Kris Kowal is in great company.

To me, #11010 is *very* important because we need to interoperate with other implementations.

comment:3 Changed 3 years ago by dmethvin

  • Cc jaubourg added

comment:4 Changed 2 years ago by domenic@…

+1, this is getting confusing with other libraries.

comment:5 Changed 20 months ago by anonymous

+1 it make more sense to fulfil a promise. How soon can this bug be resolved?

comment:6 Changed 20 months ago by mikesherov

Thanks for contributing, but bumping doesn't change the resolution. It's not going to be resolved. That's why it's marked as wontfix :-)

Note: See TracTickets for help on using tickets.