Thanks Mark.

To clarify my overly brief interjection, I tend to favor the conceptual
simplicity of the earlier "DOM" API.  Specifically:

- no "flatMap"
- the output of then is single-unwrapped
- no recursive unwrapping

I find it more simple from a conceptual standpoint because each promise
simply resolves to some value (possibly a promise) which can be accessed
via then.

If I remember correctly, AP2 was motivated by the need to support both
recursive unrwapping and single-unwrapping with a single API.  It is a
clever solution, to be sure.  But can we not simply provide a recursive
unwrapping helper function?

    Promise.when(unknown).then(unwrapped => console.log(unwrapped));

In this case, `unwrapped` will be the result of recursively unwrapping
`unknown`, if `unknown` is a promise, and the value `unknown` otherwise.

{ Kevin }
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to