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

Union types, ADTs (Kotlin: sealed classes; Rust & Swift: enums) #50

Closed
Miha-x64 opened this issue Jun 1, 2019 · 1 comment
Closed

Comments

@Miha-x64
Copy link
Owner

Miha-x64 commented Jun 1, 2019

With existing type system, union can be expressed as a Partial with only one field set.
The only drawback is that serialization format may require unions to be handled differently, see https://serde.rs/enum-representations.html

@Miha-x64 Miha-x64 changed the title Union types (Kotlin: sealed classes; Rust & Swift: enums) Union types, ADTs (Kotlin: sealed classes; Rust & Swift: enums) Jun 1, 2019
@Miha-x64
Copy link
Owner Author

94b5321

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