Orange - Free from D1/Tango
Steven Schveighoffer
schveiguy at yahoo.com
Sun Feb 17 14:13:22 PST 2013
On Sun, 17 Feb 2013 16:18:05 -0500, Walter Bright
<newshound2 at digitalmars.com> wrote:
> On 2/17/2013 12:51 PM, Jacob Carlborg wrote:
>> I just stripped out all D1 and Tango related code from Orange. D1/Tango
>> is still
>> supported in the d1 branch. Hopefully this will make it easier to
>> integrate into
>> Phobos.
>>
>> It also now supports UDA's for indicating a field/class/struct
>> shouldn't be
>> serialized:
>>
>> class Foo
>> {
>> @nonSerialized int a;
>> }
>>
>> @nonSerialized class Bar { }
>
> Hmm, shouldn't it be the other way around - marking the ones to be
> serialized?
I would think D's type system would be capable enough where a
serialization library can tell whether a type can be serialized or not.
I also think it would be a tremendous burden to put @serialized on every
type that could be serialized.
When I used C#'s serializer, it was definitely annoying to have to
annotate every type I wanted to serialize, and every type that was used
within that type.
What is the concern with an opt-out approach? I would think the default
would be the most common option -- save everything.
-Steve
More information about the Digitalmars-d
mailing list