Discussion Thread: DIP 1044--Enum Type Inference--Community Review Round 1
H. S. Teoh
hsteoh at qfbox.info
Sun Nov 20 18:03:04 UTC 2022
On Sun, Nov 20, 2022 at 03:31:44AM +0000, ryuukk_ via Digitalmars-d wrote:
[...]
> ```D
> MySuperDuperLongEnum stuff = MySuperDuperLongEnum.VALUE_A;
> ```
Why not just write:
auto stuff = MySuperDuperLongEnum.VALUE_A;
? No repetition necessary.
[...]
> why should i use an alias here?
> ```D
> ctx.network_state = State.NetworkState.CONNECTED;
>
> // vs
>
> ctx.network_state = .CONNECTED;
> ```
Walter's proposal of implicit `with` would solve this case.
T
--
"You are a very disagreeable person." "NO."
More information about the Digitalmars-d
mailing list