flax icon indicating copy to clipboard operation
flax copied to clipboard

enumerations are completely broken

Open zhiayang opened this issue 6 years ago • 0 comments

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.

zhiayang avatar Nov 27 '19 14:11 zhiayang