Request for pre-review: std.serialization/orange

Robert Jacques sandford at jhu.edu
Mon Oct 3 06:39:47 PDT 2011


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.


More information about the Digitalmars-d mailing list