Request for pre-review: std.serialization/orange

Jacob Carlborg doob at me.com
Mon Oct 3 00:06:36 PDT 2011


On 2011-10-03 05:50, Robert Jacques wrote:
> On Sat, 01 Oct 2011 06:50:52 -0400, Jacob Carlborg <doob at me.com> wrote:
>
>> On 2011-10-01 05:00, Robert Jacques wrote:
>>> I agree, which is why I suggested lookup should have some granuality.
>>> i.e. that there is both a global store of serialization methods and a
>>> per instance store of serialization methods. Lookup would first look in
>>> the local store before defaulting to the global store. But this should
>>> be a separate pair of functions.
>>
>> Aah, now I get it. That's a good idea. The question is what to name the
>> two functions. Yet another use case for overloading methods on static.
>
> How about overrideSerializer or overloadSerializer?

registerSerializer for the static method and 
overloadSerializer/overrideSerializer for the instance method?

> Umm... example code for the deserialize method should contain
> 'deserialize' somewhere inside it.


You are completley right

a = serializer!(int)("a");

Should be

a = deserialize!(int)("a");

My bad.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list