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

Jacob Shtokolov jacob.100205 at gmail.com
Wed Apr 26 13:08:22 UTC 2023


On Wednesday, 26 April 2023 at 12:50:32 UTC, bachmeier wrote:
> 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

While aliases and shorter names are always good options, 
autocomplete and copy/paste really aren't as the end user of the 
code is either yourself or another developer, so reading the mess 
produced with copy/paste makes life much more miserable :)

I wish the `with()` operator would also be an expression, so you 
could do something like:

```d
auto f = with(Flags) A | B | C |D;
```

But that breaks backwards compatibility ¯\_(ツ)_/¯


More information about the Digitalmars-d-announce mailing list