Request for pre-review: std.serialization/orange

Jacob Carlborg doob at me.com
Mon Oct 3 09:57:25 PDT 2011


On 2011-10-03 15:39, Robert Jacques wrote:
> On Mon, 03 Oct 2011 03:06:36 -0400, Jacob Carlborg <doob at me.com> wrote:
>
>> 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?
>
> Yes. Sorry for being unclear. The concept being that at the instance
> level, you are overriding default behavior.

Yes, thanks, that makes sense.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list