Implementing std.log

Jacob Carlborg doob at me.com
Tue May 17 00:31:50 PDT 2011


On 2011-05-16 01:04, Andrei Alexandrescu wrote:
> On 05/15/2011 10:22 AM, Jacob Carlborg wrote:
>> On 2011-05-14 22:37, Andrei Alexandrescu wrote:
>>> I want to nail usability before extension. Extensibility can be provided
>>> via an indirection inside FileLogger (which should indeed receive a more
>>> appropriate name).
>>>
>>>
>>> Andrei
>>
>> The obvious solution would be to have the logging functions returning an
>> interface, Logger, but interfaces seem to be banned from Phobos. Ok, I
>> see now, since templates are used this can be a problem. Hmm, templates
>> are used EVERYWHERE in Phobos.
>>
>
> No need to be ironic. Interfaces are the obvious solution, and what I
> meant when I said "indirection" (i.e. via a reference type, either
> interface or class). That being said, I think your design has a number
> of issues that I'll get into soon.
>
> Andrei

It wasn't my intention to be ironic. I missed "indirection" and just 
read something about "inside FileLogger".

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list