compiler support added for precise GC

Jacob Carlborg doob at me.com
Mon Apr 16 23:50:02 PDT 2012


On 2012-04-17 08:33, Walter Bright wrote:
> On 4/16/2012 11:26 PM, Jacob Carlborg wrote:
>> Then it won't be possible to serialize third party types if they don't
>> implements ISerializable. In this case, this solution is no better
>> then manually
>> registering types. Actually it's worse, since I can manually register
>> third
>> party types.
>
> I'm not so sure in D that you can serialize arbitrary types without them
> designed to be serializable. For example, what will you do with unions?
> Pointers to global data?

Not all types are serializable of course. For those types you would have 
to register a function or similar. But most other types are possible to 
automatically serialize. I don't see a point in making them less 
serializable by requiring to implement an interface. I also think mostly 
one would want to serialize objects or an hierarchy of objects.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list