The Paradox of Partial Parametricity

Brendan Eich brendan at mozilla.com
Fri May 24 12:40:35 PDT 2013


Tab Atkins Jr. wrote:
> What's more, if you're using .then() for things, but you're passing in
> a callback from elsewhere that assumes it can return nested promises,
> everything's still kosher!  If you chain another .then() off of it,
> you'll still get a plain value; if you chain a .chain()/.flatMap() off
> of it, you'll get the "real" return value of the inner promise.  This
> wins for everyone, in every situation I've been able to think of.

I couldn't attend the third day of the TC39 meeting, but from Mark's 
slides, I take it the solution -- or let's say "coping strategy" -- with 
AP3 is to always wrap {value: payload} if you want to chain.

Mark, is that right?

> I'm sorry that I'm not a TC39 member, and that the talks were prepared
> before the conversations earlier this week that led me to discover
> this particular combination that works best.  I think I could've
> influence the conversation better had I been there. :/

Not to worry, no final ultimate double-checked decision was reached. ;-)

/be


More information about the es-discuss mailing list