Usability of "allMembers and derivedMembers traits now only return visible symbols"
Martin Nowak via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 4 01:42:43 PDT 2016
On Sunday, 4 September 2016 at 07:24:42 UTC, Basile B. wrote:
> The introspection creates a special structure for each property
> annotated with @Set, @Get, or @SetGet. This is a kind of
> interface for serialization/binding/object inspector (a bit
> like "published" in Object Pascal).
But you can't access private fields outside of the current
module, so you need to mixin sth. to set/get the value anyhow.
>> Defining de-/serialize methods in the class/struct, e.g. with
>> a mixin template would be the cleaner and more obvious
>> approach IMO.
>
> I see your strategy...each time someone will find an argument
> to make the traits omniscients you'll say, "no because it's
> cleaner to do like that" ?
No, I'm just trying to understand the requirement for
introspection without access.
More information about the Digitalmars-d
mailing list