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

Feature Request: subset of enums as an enum #851

Open
FourierTransformer opened this issue Nov 5, 2024 · 0 comments
Open

Feature Request: subset of enums as an enum #851

FourierTransformer opened this issue Nov 5, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@FourierTransformer
Copy link
Contributor

Having a subset of enums that are part of a larger set of enums. I wrote some code that where users could register custom handling around some of the types used by the system, and had to keep track of those types separately (but they did need to align with the main set of enums).

An example (to hopefully clear things up a bit):

-- options used in configuration, but need to be a string from TomlType
local enum TomlConversionType
    "datetime-local"
    "datetime"
    "date-local"
    "time-local"
end

local enum TomlType
    "string"
    "integer"
    "float"
    "bool"
    "datetime"
    "datetime-local"
    "date-local"
    "time-local"
end

Potential syntax: local enum TomlConversionType is TomlType (indicating that any values within TomlConversionType have to be a TomlType as well)

Maybe an odd idea, and curious if others would have any potential uses for it.

@hishamhm hishamhm added the feature request New feature or request label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants