Enum literals, good? bad? what do you think?
Paul Backus
snarwin at gmail.com
Tue Jul 20 16:34:13 UTC 2021
On Tuesday, 20 July 2021 at 15:50:49 UTC, russhy wrote:
> So what do you think? yay? nay? why not?
>
>
> [1] https://github.com/RUSshy/DIPs/blob/patch-2/DIPs/DIP1xxx.md
Currently, name lookup in D is done independently from
type-checking. This proposal would require name lookup to depend
on type checking in order to compile code like the following
example:
```d
enum A { x }
enum B { x }
A var = .x;
```
I don't think adding this kind of complexity to the language
semantics is worth it just to save a few characters.
More information about the Digitalmars-d
mailing list