This simple PR suggests removing the some(), map(), reduce() functions to reduce the API surface. With these changes applied, our API is pretty much identical to ES6 promises commonly used in JavaScript. This makes our APIs appear less complex and thus easier to understand.
Empirical evidence suggests these functions aren't used very commonly in our ecosystem either, so I'd rather use the chance to clean up our API surface with the upcoming Promise v3 release. I don't currently see a prominent need for these functions, but I'm open to the idea of reintroducing them later if needed. There's reason to believe that these functions could (should?) exist as part of our new reactphp/async package, especially considering how it mimics part of async.js.
I'm filing this as an RFC to get more feedback on these functions and to see how others feel about this. If this gets merged, I'll file a follow-up PR to deprecate these functions for Promise v2 to ease upgrading.
This simple PR suggests removing the
some()
,map()
,reduce()
functions to reduce the API surface. With these changes applied, our API is pretty much identical to ES6 promises commonly used in JavaScript. This makes our APIs appear less complex and thus easier to understand.Empirical evidence suggests these functions aren't used very commonly in our ecosystem either, so I'd rather use the chance to clean up our API surface with the upcoming Promise v3 release. I don't currently see a prominent need for these functions, but I'm open to the idea of reintroducing them later if needed. There's reason to believe that these functions could (should?) exist as part of our new reactphp/async package, especially considering how it mimics part of async.js.
I'm filing this as an RFC to get more feedback on these functions and to see how others feel about this. If this gets merged, I'll file a follow-up PR to deprecate these functions for Promise v2 to ease upgrading.
Refs #35