You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm more and more thinking the method shouldn't be named when. It doesn't really matter for promise implementations with just that method such as Amp's Deferred / Placeholder, but it certainly matters if you have other methods as well.
React is one library providing further methods, but those are strictly about the core nature of a promise, getting the value or reason out. It's more problematic if a promise is more than a simple placeholder, such as Amp\Message or Aerys\BodyParser. Those implement Promise to provide a mechanism to consume the complete result easily, while at the same time allowing the consumption of intermediate results.
Currently I can offer the following suggestions: onResolve, onComplete.
Maybe this also helps differentiating between when and then, as they're quite similar currently.
The text was updated successfully, but these errors were encountered:
I'm more and more thinking the method shouldn't be named
when
. It doesn't really matter for promise implementations with just that method such as Amp'sDeferred
/Placeholder
, but it certainly matters if you have other methods as well.React is one library providing further methods, but those are strictly about the core nature of a promise, getting the value or reason out. It's more problematic if a promise is more than a simple placeholder, such as
Amp\Message
orAerys\BodyParser
. Those implementPromise
to provide a mechanism to consume the complete result easily, while at the same time allowing the consumption of intermediate results.Currently I can offer the following suggestions:
onResolve
,onComplete
.Maybe this also helps differentiating between
when
andthen
, as they're quite similar currently.The text was updated successfully, but these errors were encountered: