NREL-Sienna / InfrastructureSystems.jl

Utility package for Sienna's simulation infrastructure
https://nrel-sienna.github.io/InfrastructureSystems.jl/stable/
BSD 3-Clause "New" or "Revised" License
39 stars 21 forks source link

`@scoped_enum` should handle words ending with `y` #186

Closed kdheepak closed 3 years ago

kdheepak commented 3 years ago

I'm opening the issue to track a feature request.

jd-lara commented 3 years ago

should also handle words ending in s.

daniel-thom commented 3 years ago

Should we change this macro to work like this? I'm not sure that we can always generate the plural version. I also don't know if we can make the macro work with an optional parameter (in order to avoid breaking the interface).

@scoped_enum Fruits Fruit begin
    APPLE
    ORANGE
end

value = Fruits.APPLE
jd-lara commented 3 years ago

I like the idea of this interface

daniel-thom commented 3 years ago

We don't export this macro anywhere, so we can make the change. The existing uses won't change.