I think flattening is also tied inextricably to the fact that promises are
a featureless wrapper for values.  Nobody cares about promises-as-values
because of this featureless-ness.  And because they are completely
uninteresting as values, programmers can think "straight through" to the
eventual value.

This is highly simplifying for the programmer, especially in the context of
complex asynchronous data flows.  It is a valuable property and in a sense
resembles a pure, universal currency.

This suggests a warning:  if we admit promise subclassing (in which
subclasses have extra features, such as cancel-ability), then this useful
property goes away, and with it flattening.

{ Kevin }
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to