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

Support runtime-defined enums #537

Open
MateuszKubuszok opened this issue May 19, 2024 · 0 comments
Open

Support runtime-defined enums #537

MateuszKubuszok opened this issue May 19, 2024 · 0 comments
Labels
dragons ahead Task which requires handwriting compiletime reflection for Scala2&3 and/or updating the architecture enhancement

Comments

@MateuszKubuszok
Copy link
Member

Some enum-like types cannot be guaranteed to have fixed number of instances known at compile-time (or at least they cannot have exhaustive pattern-matching).

It would be useful to define some interface which could mapping to/from them in the runtime (probably only with PartialTransformers).

Example which could be handled with such approach could be various customizations to scala.Enumeration (they might not work the best with what we use for sealed/Scala 3 enums/Java enums) or large, immutable (but build in the runtime) sets of values.

@MateuszKubuszok MateuszKubuszok added enhancement dragons ahead Task which requires handwriting compiletime reflection for Scala2&3 and/or updating the architecture labels May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dragons ahead Task which requires handwriting compiletime reflection for Scala2&3 and/or updating the architecture enhancement
Projects
None yet
Development

No branches or pull requests

1 participant