Methods in enums

sighoya sighoya at gmail.com
Tue Aug 15 10:52:00 UTC 2023


First, thanks Teoh and Alexandru for presenting a possible 
workaround

However, what we also want are methods taking the enum itself as 
argument, which isn't possible with the solutions presented so 
far because of cyclicity.

So +1 from me for a possible DIP to get it done.

On Monday, 14 August 2023 at 23:40:33 UTC, WebFreak001 wrote:
> This would allow selective imports for enums, e.g. `import 
> somemod : MyEnum;` to also pull in all the global UFCS

Can you elaborate more?
Why are enum functions ufcs?

And is it possible to import ufcs functions for a specific 
imported symbol?
Would interest me.


More information about the Digitalmars-d mailing list