Why is this not allowed?

Nick Treleaven nick at geany.org
Sun Oct 6 10:19:55 UTC 2024


On Saturday, 5 October 2024 at 17:26:59 UTC, Steven Schveighoffer 
wrote:
> It’s the semicolon. As soon as the closing brace, the 
> declaration is over. You would have to invent new syntax.

Maybe type tuple syntax will support this:
```d
struct EntityDef
{
     (int hp) stats;
}

EntityDef ed;
int x = ed.stats.hp;
```


More information about the Digitalmars-d-learn mailing list