-
-
Notifications
You must be signed in to change notification settings - Fork 142
Open
Description
I don't really see the point of IOSuccess and IOFailure. From one hand, IOResult.from_value(1) == IOSuccess.from_value(1). Actually ,IOSuccess.from_value(1) == IOFailure.from_value(1).
I would also expect some benefit when using it in a match-case. Something like:
value = IOSuccess.from_value(1)
match value:
case IOSuccess(v): assert(v == 1)
case _: passHowever, the "correct" code is
value = IOSuccess.from_value(1)
match value:
case IOResult(Success(v)): assert(v == 1)
case _: passTherefore, IOSuccess and IOFailure as aliases are quite confusing. Don't you think?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels