Why is this not allowed?
ryuukk_
ryuukk.dev at gmail.com
Mon Oct 7 08:05:59 UTC 2024
On Sunday, 6 October 2024 at 10:19:55 UTC, Nick Treleaven wrote:
> 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;
> ```
Let's focus on what exist today, i'm not looking for working on
my game in 10 years
I'm working on it TODAY, therefore i need a today's solution
More information about the Digitalmars-d-learn
mailing list