DIPX: Enum Literals / Implicit Selector Expression

russhy russhyy at gmail.com
Thu Dec 2 19:44:07 UTC 2021


# DIPX: Enum Literals / Implicit Selector Expression

I watched DConf and the idea was suggested, there wasn't any 
disagreements or negative comments about it, so i figured it's 
time to start to work on the DIP!

That's a feature i long desired, and i'm pretty envious of the 
languages that have it implemented, to name a few: Zig/Odin/Jai

``with`` is often mentioned as a way to do something similar, but 
it is not the same as just calling the enum.. plus it pollutes 
the scope and introduce issues such as symbol/name clashes, this 
is not what we want

Of course the DIP is not complete, it's a start, let's discuss 
about it, let's improve the DIP and let's find solutions how it 
could be implemented if we all agree that it would be a nice 
addition to the language!

Link: 
https://gist.github.com/RUSShyTwo/2fcf6d294d25ba748d61927b5eed2944


More information about the Digitalmars-d mailing list