Puzzled

Max Samukha maxsamukha at gmail.com
Wed Dec 13 06:31:17 UTC 2023


On Tuesday, 12 December 2023 at 21:48:59 UTC, Timon Gehr wrote:

> You can pass `Foo.bar` and `Foo.baz` as aliases, but I think 
> currently there is no good way to access a field of an object 
> based on an alias to the field symbol. (Other than 
> `__traits(getMember, self, __traits(identifier, field))`, but 
> that bypasses all the typechecking you might get anyway.)

`__traits(child, ...)` works sometimes.




More information about the Digitalmars-d mailing list