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

bachmeier no at spam.net
Wed Nov 23 15:24:42 UTC 2022


On Wednesday, 23 November 2022 at 04:43:16 UTC, IchorDev wrote:

> Aliasing requires figuring out a good alias name, polluting the 
> namespace, and just feels like a hack.

Naming stuff is a technique that has been used in programming 
languages for quite a while. It's a feature I can't do without. 
Finding good names for things is indeed important. And polluting 
the namespace is bad. I don't know what that has to do with this 
DIP or with alias. I also don't agree that naming things is a 
hack.

> It's nice that D lets you, but I think a dedicated mechanism to 
> reduce typing fatigue is better than obfuscation.

Then find a better editor/IDE. One that has copy and paste.

> "What's this... `M`?" *searches library* "What? This isn't in 
> here!" *searches codebase* "Oh, it's an alias of `Magic`. Who 
> did this?"
> vs
> "`$`? Oh, this function call uses ETI. Let me see its 
> declaration..." *checks declaration* "Okay it's `Magic`"

This is absurd. The DIP proposes using the same `$` to refer to 
*any* enum. If someone is confused by an explicit name, by 
definition they're going to be confused by a generic `$`.




More information about the Digitalmars-d mailing list