Closed ousado closed 11 years ago
The haxe issue has been closed, we now have @:fakeEnum abstracts (although I still plan to change the metadata name). Can we use this here?
yes, I think so
Guess it's closed then. However it'd be so nice to support the enum X { A = 10; B = 20; } syntax :) . Did Nicolas rule that out?
I wanted something like abstract enum
to distinguish it, but discussing syntax with Nicolas is like discussing politics with the sky. ;)
related issue https://github.com/HaxeFoundation/haxe/issues/923
see e.g. http://icu-project.org/apiref/icu4c/utypes_8h_source.html for a "complicated" case. I'd like to have static exhaustiveness checks for these. I'd suggest
@:cEnum enum Errors { @:value(1) Err1; @:value(2) Err2; ... } (or something like that, I don't really care for the naming much)
until that issue is closed. This is too useful, especially for C, to not do it.