Skip to content

macroexprs on enums #1067

@lenscas

Description

@lenscas

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions