compiler support added for precise GC

Jacob Carlborg doob at me.com
Wed Apr 18 10:59:16 PDT 2012


On 2012-04-18 19:36, Steven Schveighoffer wrote:
> On Wed, 18 Apr 2012 13:18:20 -0400, Robert Clipsham

>> From my quick google I couldn't find a definitive answer, but:
>>
>> http://stackoverflow.com/questions/4408909/why-classes-are-not-serializable-by-default-in-net
>>
>>
>> http://en.wikipedia.org/wiki/Serialization (reasons listed under Java)
>
> I think those answer the question quite well.
>
> In summary, just because you *can* serialize a type doesn't mean you
> *should*, and the risks of serializing something that shouldn't be
> serialized trumps the convenience of not having to mark it. The latter
> part is really a subjective statement, but I would agree with it.

I suspected something like that.

> I bet part of the confusion comes from the fact that such attributes are
> named "Serializable", whereas pretty much anything is serializable. It
> should be something more along the lines of "AllowSerialization"
>
> -Steve


-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list