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

Remove "subtyping" based variants #28

Open
kritzcreek opened this issue Sep 8, 2024 · 0 comments
Open

Remove "subtyping" based variants #28

kritzcreek opened this issue Sep 8, 2024 · 0 comments

Comments

@kritzcreek
Copy link
Owner

The idea was cute:

variant V {
  struct A { a : Int }
}

match v {
  V::A a => a // has type `V::A` here, which is `struct { a : int }`
}

but to make it work properly I need full subtyping, and I'd rather not. This means switching to pattern matching that has to extract the fields and bind them to local variables.

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