DIPX: Enum Literals / Implicit Selector Expression
Mike Parker
aldacron at gmail.com
Thu Jun 30 11:32:06 UTC 2022
On Thursday, 30 June 2022 at 11:26:01 UTC, ryuukk_ wrote:
>
> This is exactly why we need it to be implemented, to avoid
> putting things in the global scope and therefore leaking
I think "need" is a strong word here. I'm arguing we don't "need"
it. I understand some people want it.
>
> It better to make use of the type system and be a little more
> cleaner without having to rely on mixin/template/imports
>
> It should just work
Why should it just work, though? What justifies the potential
confusion of having two different meanings for `.foo` when we
already have `with`, and `auto`, and the ability to mixin aliases
for those who really, really, want it.
To be clear, I do think adding this feature with the proposed
syntax would be a mistake because it's one more potential point
of confusion for new users. But on a personal level, I'm
ambivalent. If it were added, I'd say "meh" and move on. I'm just
pushing for some strong justification.
More information about the Digitalmars-d
mailing list