Discussion Thread: DIP 1044--Enum Type Inference--Community Review Round 1

XavierAP n3minis-git at yahoo.es
Wed Nov 23 08:18:56 UTC 2022


On Wednesday, 23 November 2022 at 04:43:16 UTC, IchorDev wrote:
>>
>> Is it because your enum names are too long (in some context)? 
>> Just alias them.
>
> Aliasing requires figuring out a good alias name, polluting the 
> namespace, and just feels like a hack. It's nice that D lets 
> you, but I think a dedicated mechanism to reduce typing fatigue 
> is better than obfuscation.

I agree aliasing should in general be avoided (certainly never 
down to single letters) in favor of good, readable names overall. 
It can help you when importing third party stuff whose names are 
bad overall or have room for improvement in your context.


More information about the Digitalmars-d mailing list