Discussion Thread: DIP 1044--Enum Type Inference--Community Review Round 1
    Andrey Zherikov 
    andrey.zherikov at gmail.com
       
    Sat Nov 19 08:44:34 UTC 2022
    
    
  
On Saturday, 19 November 2022 at 08:33:50 UTC, Dukc wrote:
> Since with creates a new scope, it would have to be
>
> ```D
> auto flag = { with(MySuperLongType) return
>      ValueA | ValueB | ValueC | ValueD
>      | ValueE | ValueF | ValueG;
> }();
> ```
>
> Still a lot better than repeating `MySuperLongType` for each 
> member IMO, but ugly enough that this DIP would be an 
> improvement.
Will this be better if it's supported?
```d
auto flag = with(MySuperLongType)
             ValueA | ValueB | ValueC | ValueD | ValueE | ValueF | 
ValueG;
```
    
    
More information about the Digitalmars-d
mailing list