compiler support added for precise GC
Steven Schveighoffer
schveiguy at yahoo.com
Wed Apr 18 04:06:46 PDT 2012
On Tue, 17 Apr 2012 02:50:02 -0400, Jacob Carlborg <doob at me.com> wrote:
> 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.
Can you explain why .NET types are not by default serializable? All of
them have full runtime reflection AFAIK.
I'm not using that as an argument, I'm genuinely interested.
-Steve
More information about the Digitalmars-d
mailing list