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

ryuukk_ ryuukk.dev at gmail.com
Sun Nov 20 03:31:44 UTC 2022


On Sunday, 20 November 2022 at 01:00:58 UTC, deadalnix wrote:
> On Friday, 18 November 2022 at 15:37:31 UTC, Mike Parker wrote:
>> ## Discussion Thread
>>
>> This is the discussion thread for the first round of Community 
>> Review of DIP 1044, "Enum Type Inference":
>>
>> https://github.com/dlang/DIPs/blob/e2ca557ab9d3e60305a37da0d5b58299e0a9de0e/DIPs/DIP1044.md
>>
>> The review period will **end at 11:59 PM ET on December 3**, 
>> or when I make a post declaring it complete. Discussion in 
>> this thread may continue beyond that point.
>>
>> Here in the discussion thread, you are free to discuss 
>> anything and everything related to the DIP. Express your 
>> support or opposition, debate alternatives, argue the merits, 
>> etc.
>>
>> However, if you have any specific feedback on how to improve 
>> the proposal itself, then please post it in the Feedback 
>> Thread. The Feedback Thread will be the source for the review 
>> summary that I will write at the end of this review round. I 
>> will post a link to that thread immediately following this 
>> post. Just be sure to read and understand the Reviewer 
>> Guidelines before posting there:
>>
>> https://github.com/dlang/DIPs/blob/master/docs/guidelines-reviewers.md
>>
>> And my blog post on the difference between the Discussion and 
>> Feedback threads:
>>
>> https://dlang.org/blog/2020/01/26/dip-reviews-discussion-vs-feedback/
>>
>> Please stay on topic here. I will delete posts that are 
>> completely off-topic.
>
>
> I have very simple feedback.
>
> STOP CHANGING THE GOD DAMN SYNTAX!
> STOP, STOP, STOP, and if you still have some doubt, STOP!
>
> Every time, it breaks a ton of tools.
>
> It's not worth it.
>
> If typing the name of the enum is too long, then just use 
> `with` or `alias E = MyEnumNameThatIsTooLongAndAnoyingToType;`.
>
> These changes do not solve any actual problem. They just break 
> tools.
>
> STOP IT!

Relax, it's just a discussion

As for tooling i agree, we should not break tooling, hence why i 
advocate for synchronizing tooling updates with language updates: 
https://forum.dlang.org/thread/bjurxmbmdtcxblgcswch@forum.dlang.org

As for the feature, having to `alias` is the reason why i 
advocate for that feature, we should not have to alias things and 
add useless cognitive load to read obvious lines

This features doesn't solve your problems, but it personally 
solve mines

If tooling is synchronized with the feature, do you still have an 
objection for this feature?


```D
MySuperDuperLongEnum stuff = MySuperDuperLongEnum.VALUE_A;
```

Why should i use an alias here for this simple variable? don't 
you see it as an improvement?

```D
MySuperDuperLongEnum stuff = .VALUE_A;
```


why should i use an alias here?
```D
ctx.network_state = State.NetworkState.CONNECTED;

// vs

ctx.network_state = .CONNECTED;
```



More information about the Digitalmars-d mailing list