Enum literals, good? bad? what do you think?

Walter Bright newshound2 at digitalmars.com
Wed Jul 21 23:58:46 UTC 2021


On 7/21/2021 4:32 PM, Adam D Ruppe wrote:
> Consider:
> 
> import a;
> import b;
> 
> foo(something);
> bar(something);
> 
> foo and bar take different types that both have a member something. the swift 
> examples resolve correctly. This does not and requires disambiguation on both uses.

True, but that isn't specific to enums. D does not attempt to do overloading on 
anything but functions & templates. Implementing russhy's proposal won't change 
that.


More information about the Digitalmars-d mailing list