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

Move Xor and Ior to cyclops-sum-types #366

Closed
johnmcclean opened this issue Nov 18, 2016 · 3 comments
Closed

Move Xor and Ior to cyclops-sum-types #366

johnmcclean opened this issue Nov 18, 2016 · 3 comments
Milestone

Comments

@johnmcclean
Copy link
Member

Xor in Cats has been removed in favour of Either in the Scala STD lib (see typelevel/cats#1192). That means cyclops-react is probably unique in having a sum type called Xor.

Javaslang has also made it's Either type right biased (see vavr-io/vavr#674) which lowers the value add by having an Xor type in cyclops-react.

I think there is value in having a set of lazy Either types, with in built tail recursion, in cyclops-sum-types.

Tail recursion optimization allows implementations such as https://gist.github.com/johnmcclean-aol/e2e6f549afe5031205fb25ed44002647#file-what-the-present-of-java-can-look-like-java

@johnmcclean johnmcclean added this to the 2.0.0 milestone Nov 18, 2016
@johnmcclean
Copy link
Member Author

Having an eager sum type is useful when implementing lazy sum types so Xor could possibly stay.

@johnmcclean
Copy link
Member Author

(Lazy) Either can extend Xor in a non-core module

@johnmcclean johnmcclean changed the title Rename Xor to Either, move to cyclops-sum-types, make totally Lazy & tail recursive Move Xor and Ior to cyclops-sum-types Dec 1, 2016
@johnmcclean
Copy link
Member Author

Moved sum-types into the core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant