-
Notifications
You must be signed in to change notification settings - Fork 54
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
data: Rename Maybe.Defined/Empty to Present/Absent and export them to the kyo package #734
Conversation
947391a
to
ddc9ebc
Compare
As discussed offline, I am concerned with collisions with
Or perhaps we could just export the |
+1 |
I like Present/Absent as well since it'd hardly conflict with other types and feels more natural to communicate meaning to newcomers. Just/Void has the Haskell precedence that helps with understanding but I find it a bit opaque. |
ddc9ebc
to
41688c5
Compare
I've updated the PR with the rename to Present/Absent to see how it feels. It seems ok, the only thing I wasn't sure about is if we should also rename methods like |
@@ -114,7 +114,7 @@ private[kyo] object LayerMacros: | |||
case And(left: LayerLike[A], right: LayerLike[A]) | |||
case To(left: LayerLike[A], right: LayerLike[A]) | |||
case Value(value: A) | |||
case Empty | |||
case Absent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accidental?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps worth renaming PR title for release notes - LGTM!
I sometimes avoid pattern matching on
Maybe
because it feels too verbose. This PR exportsMaybe.Empty
andMaybe.Defined
as members in thekyo
package. It also reduces the syntax overhead for trackingAbort[Empty]
. It seems reasonable since the type names shouldn't conflict with common types.