-
Notifications
You must be signed in to change notification settings - Fork 4
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
Self-documenting offer!()
and choose!()
#101
Comments
I've been hoping for something like this for a while; unfortunately, there are some nasty reasons this is not currently doable. Right now, the numeric indices are used to index a trait as const generics ( |
Also... just realized you're probably looking at |
This isn't presently possible because at macro expansion time, there's no way to go from If you can access the enum, then you can turn that into an integer using a sweet hack™ which would involve having a module by the same name (so it gets imported automatically with the Both of these issues could be solved a lot nicer with const generic enums, but so could a lot of dialectic. |
Could we do something like:
End
andPush
would reduce to enums:The text was updated successfully, but these errors were encountered: