-
Notifications
You must be signed in to change notification settings - Fork 151
macroexprs on enums #1067
Copy link
Copy link
Open
Labels
feature requestNew feature or requestNew feature or request
Description
Due to enums being represented as strings (for good reason.) You can't really attach methods to them.
However, sometimes you want to attach more complex behavior to them. Which right now means you are stuck making free floating functions.
While the ability to attach macroexpressions doesn't take this away entirely, they would allow you to at least make them callable from instances of the enum as if they are methods.
It would also make enums more inline with records and interfaces. As both of those have access to macroexpr based methods.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or request