php-try
php-try copied to clipboard
Separates result objects from the Attempt factory
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.