Chances of D getting proper runtime reflection?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Aug 21 15:35:40 PDT 2011
On 8/21/11 1:19 PM, Jacob Carlborg wrote:
> On 2011-08-21 17:30, Robert Clipsham wrote:
>> On 21/08/2011 16:05, Jacob Carlborg wrote:
>>> This is for a serialization library where third party types need to be
>>> serializable. I don't like the idea of annotate everything that should
>>> be serializable.
>>
>> You don't need to annotate it:
>>
>> void serialize(T)(T something);
>>
>> You have access to all the CT reflection stuff, and can generate the
>> necessary runtime reflection with that.
>
> I already have a fully working serialization library. I'm hoping to make
> it better. The problem is when (de)serializing through a base class
> reference. Currently you need to register the subclass with the
> serializer. If T is Base and the actually runtime type is Sub it won't
> work.
If we get to the point where adding one line of code inside or
(preferably) outside a type to make it serializable, that would be great.
Andrei
More information about the Digitalmars-d
mailing list