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

enumerations are completely broken #42

Open
zhiayang opened this issue Nov 27, 2019 · 0 comments
Open

enumerations are completely broken #42

zhiayang opened this issue Nov 27, 2019 · 0 comments

Comments

@zhiayang
Copy link
Member

obviously i had 0 foresight when redesigning the enum system during the rewrite. they're not completely unusable currently, but only if you restrict yourself to flax code. For interoperating with C code, because enum case values are a 2-word struct, they become dumb.

we need the idea of a @raw enum that is literally a typesafe value, without any of that struct wrapping stuff with the index or whatever. Of course you lose type information, but it's not like we have any type introspection in the language now anyway.

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