Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#Nil_Is_Success Move Nil under the Success Interface to make clear that Nil is a succes #272

Open
RamAnvesh opened this issue Nov 1, 2024 · 0 comments
Labels
good first issue Good for newcomers size: xs super small change

Comments

@RamAnvesh
Copy link
Collaborator

RamAnvesh commented Nov 1, 2024

Today, the Errable class hierarchy is three independent children: Success, Failure and Nil. This can be confusing. When a computation returns a Nil, it is considered success, but with no result.

We need to move Nil under Success:

sealed interface Errable permits Success, Failure
sealed interface Success permits Value, Nil

final class Success<T> implements Errable<T>
final class Value<T> implements Success<T>
final class Nil<T> implements Success<Void>
final class Failure<T> implements Errable<Void>
@RamAnvesh RamAnvesh added good first issue Good for newcomers size: xs super small change labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers size: xs super small change
Projects
None yet
Development

No branches or pull requests

1 participant