Proposal: user defined attributes
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed Mar 21 09:02:21 PDT 2012
On 3/21/12 10:20 AM, F i L wrote:
> Andrei Alexandrescu wrote:
>> In case there are several non-serialized variables, how do you avoid
>> clashes between different definitions of __nonSerialized?
>
> struct A {
> int a, b;
> mixin NonSerialized!(a, b);
> }
>
> static const __nonSerialized = ["a", "b"];
That's may be a problem because it makes it impossible to put together
fields and their non-serializable property.
Ideally the above should work, and also mixing in several NonSerialized
instances within the same type should also work.
Andrei
More information about the Digitalmars-d
mailing list