@property - take it behind the woodshed and shoot it?
deadalnix
deadalnix at gmail.com
Fri Jan 25 03:17:06 PST 2013
On Friday, 25 January 2013 at 11:00:34 UTC, Jacob Carlborg wrote:
> On 2013-01-25 01:55, kenji hara wrote:
>> I can imagine a situation that we might not want to treat
>> property
>> functions as DATAs simply.
>>
>> If you have a struct which have some property functions as
>> members, and
>> you'd want to serialize it:
>>
>> struct S {
>> int value_;
>> @property int value() { return value_; }
>> }
>>
>> At least, the serialization library should recognize the
>> S.value is a
>> _property function_, not a int DATA.
>
> A serialization library would only recognize "value_" since
> it's an instance variable.
getFields/getProperties/getMethods and you are done. It don't
sounds that much of a problem to me.
More information about the Digitalmars-d
mailing list