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

Consider whether algebraic data types should use sealed abstract classes #10

Open
noelwelsh opened this issue Feb 16, 2016 · 0 comments

Comments

@noelwelsh
Copy link
Contributor

There are several benefits to using a sealed abstract class as the base of an algebraic data type:

  • it is faster
  • Java interop is cleaner
  • it is semantically clearer (an abstract class can't be mixed into multiple classes)

The disadvantage is we have to introduce another concept (abstract classes).

This will require quite a bit of rewriting.

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

No branches or pull requests

1 participant