Implementing std.log

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun May 15 16:04:20 PDT 2011


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


More information about the Digitalmars-d mailing list