Chances of D getting proper runtime reflection?

Jacob Carlborg doob at me.com
Sun Aug 21 11:19:44 PDT 2011


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.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list