domenic / promises-unwrapping

The ES6 promises spec, as per September 2013 TC39 meeting
1.24k stars 95 forks source link

Replace "thenable" with "promise-like"? #33

Closed domenic closed 10 years ago

domenic commented 11 years ago

As much as "thenable" has served us well in the promise community, for an ES-spec, the notion of "array-like" gives us a good precedence. It also helps overcome some peoples' confusion at the concept. We should probably adopt it.

@erights, I know you were a fan of thenable (actually you were the one that helped Kris and I realize we should adopt it more formally in our precise language). Any objections?

erights commented 11 years ago

@domenic yes, sorry, I do object. I have repeatedly encountered people who confuse thenables with promises. Using very different names for these two concepts helps distinguish them. "Promise-like" suggests throwing them in the same mental category as promises.

Citing the history of "array-like" IMO is another strike against it. We've repeatedly tried to pin down what we mean by this (including myself: http://wiki.ecmascript.org/doku.php?id=conventions:isarraylike ) and given up.

And finally, many built-in methods try to operate on array-likes and arrays in similar manner. This is not true for thenables. The only thing we do with thenables is assimilate them, and then safely interact with the promise they are assimilated into.

annevk commented 11 years ago

Keeping thenables works for me, but given that this is editorial I think @allenwb should make the call.

domenic commented 10 years ago

Assigning to @allenwb for some input. I can go either way.

domenic commented 10 years ago

@allenwb doesn't seem to care much one way or another; closing. Feel free to reopen, @allenwb.