We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This will allow to have maybe as a union
maybe
type maybe<T> union { Some T None }
And maybe will simplify/improve design for #747 because it's no longer special case
Since it's possible to have tag-only members, it's possible to have tag-only unions
type Weekdays union { Monday Tuesday Wednesday Thursday Friday }
Tags are (most likely) gonna be represented with 1-byte integers, same as enums. This is basically 2 ways of doing the same thing
This is kinds the same thing value unions in TypeScript (despite better memory consumption):
type Weekdays = 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday'
This is basically what's called "enums" in Rust. I don't like that name, honestly, since it's more related to C-like enums to me, but we'll see.
The text was updated successfully, but these errors were encountered:
idx
last
Should be part of #751
Sorry, something went wrong.
No branches or pull requests
Mixed
This will allow to have
maybe
as a unionAnd maybe will simplify/improve design for #747 because it's no longer special case
Tag-only
Since it's possible to have tag-only members, it's possible to have tag-only unions
Tags are (most likely) gonna be represented with 1-byte integers, same as enums. This is basically 2 ways of doing the same thing
This is kinds the same thing value unions in TypeScript (despite better memory consumption):
Naming?
This is basically what's called "enums" in Rust. I don't like that name, honestly, since it's more related to C-like enums to me, but we'll see.
The text was updated successfully, but these errors were encountered: