DIP1044---"Enum Type Inference"---Formal Assessment

bachmeier no at spam.net
Wed Apr 26 12:50:32 UTC 2023


On Wednesday, 26 April 2023 at 11:52:31 UTC, Jacob Shtokolov 
wrote:
> On Tuesday, 25 April 2023 at 20:15:39 UTC, ryuukk_ wrote:
>> void set_connected()
>> {
>>     network_connect_state = NetworkConnectState.CONNECTED
>> }
>>
>> MySuperLongNameFlag flag = MySuperLongNameFlag.A | 
>> MySuperLongNameFlag.B | MySuperLongNameFlag.C | 
>> MySuperLongNameFlag.D;
>>
>>
>> set_flags(MySuperLongNameFlag.A | MySuperLongNameFlag.B | 
>> MySuperLongNameFlag.C | MySuperLongNameFlag.D)
>
> Okay, I understand this is sometimes really annoying, but in 
> this example, why can't you just:

Many other solutions were provided as well, including but not 
limited to

- Using shorter names
- Using alias
- Using an IDE with autocomplete
- Using copy and paste


More information about the Digitalmars-d-announce mailing list