php-try icon indicating copy to clipboard operation
php-try copied to clipboard

Separates result objects from the Attempt factory

Open mrclay opened this issue 11 years ago • 0 comments

What initially struck me as confusing was that the API naming made it felt like a Promise. Successes and failures are conceptually results (or outcomes), not attempts, and the "on*" methods make it feel like we're setting up event handlers, rather than responding to an outcome already computed.

These gripes are really with the Scala API's naming choices (and it's good to keep a port close to the original), but I thought I'd offer this PR anyway. I'm not invested it in.

mrclay avatar Jul 31 '14 15:07 mrclay