Closed BriceCroix closed 1 year ago
I'm just taking a look at synonyms of failure or errors and I genuinely think that Sin
if the perfect word for it.
you are going to hate me but I think this package is better and more complete than the one you used. The good news is it is very similar to the one you used so changing is not really difficult here.
But i particularly like the extension methods toFailure
toSuccess
, the Unit
type and the rich documentation
I hate that you could not be more right (righter ?). This package is exactly what we need, I also like the AsyncResult
, that simplifies writing Future<Result<T,E>>
. Besides with a little luck I may be able to rename Fault
to Failure
, it was way more accurate.
Sin
? really ? xD
nope, the result subclasse sare still Failure
and Success
but yes, I am dead serious about Sin
, it works great and it's fun
I actually quite like Fault
after all, but I did not even think about Issue
, I may go with that if you agree
There you go ! Ready to merge !
This allows to be more explicit about return types in repositories and usecases. But as the type
Failure
exists in the libraryresult_type
, our ownFailure
had to be renamed toFault
, any better name is welcome, as I did not want to write an abbreviation such asErr
orFail
.