Discussion Thread: DIP 1044--Enum Type Inference--Community Review Round 1
Max Samukha
maxsamukha at gmail.com
Mon Nov 28 07:06:56 UTC 2022
On Sunday, 27 November 2022 at 21:58:00 UTC, XavierAP wrote:
> (seemingly absurd but purposeful)
Why is that absurd?
This:
```
struct Entity
{
enum Kind
{
}
Kind entity;
}
```
instead of this:
```
enum EntityKind
{
}
struct Entity
{
EntityKind entity;
}
```
is a common practice.
If the inner definitions become too long, it does make sense to
move them to the outer scope (and then optionally alias inside
the inner scope).
More information about the Digitalmars-d
mailing list