Usability of "allMembers and derivedMembers traits now only return visible symbols"

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 4 05:36:43 PDT 2016


On 9/4/16 5:56 AM, Martin Nowak wrote:
> On Saturday, 3 September 2016 at 19:31:12 UTC, Jacob Carlborg wrote:
>> That can usually be solved using .tupleof[i], but I agree.
>
> Well, .tupleof gives you a typed representation of the memory layout, to
> me it's something different than qualified access of fields, just a
> safer mean to access memory. And sure you can always memcpy data.
> Also introspection works on .tupleof, so it's not affected by the
> allMembers change and it's awkward to mix them b/c names and layout
> don't have a simple 1-to-1 relation.

Yah, .tupleof is great to have. I think that should be enough for most 
introspection needs. Only the field names are missing, can those be 
accessed somehow? -- Andrei


More information about the Digitalmars-d mailing list