Implementing std.log
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue May 17 13:15:02 PDT 2011
On 5/17/11 4:02 AM, Jacob Carlborg wrote:
> On 2011-05-16 02:05, Andrei Alexandrescu wrote:
>> Thanks for your work.
>>
>> I think there's an important distinction to be made. There are two
>> "API"s being discussed. One is the client interface and the other is the
>> extensibility interface.
>>
>> Jose looked into both: he provided a client interface that has
>> formatting, levels, enabling, and such, and an extensibility interface
>> that essentially is a simple output stream.
>>
>> My library explores the client interface and leaves the extensibility
>> interface as an obvious piece of work that needs little agreement and
>> minimal design effort.
>>
>> Finally, your library keeps the client interface to a minimum and
>> focuses almost exclusively on the extensibility interface. In doing so,
>> it makes few choices that I disagree with. Allow me to share some
>> specific feedback.
>
> Note that my suggestion was just a simple and incomplete suggestion on
> how the API could look like. I only provided "info", "warning" and
> "error" methods as examples, I'm not saying the API should only have
> these three levels.
[snip]
I thought about this some more and I understand I sounded unfair. There
is a lot of merit and there are a lot of good ideas in your code (and of
course Jose's), which I didn't mention for the simple but cold reason
that negative feedback is more informative. But neglecting the merits is
a mistake as well. I'll incorporate some of the ideas you suggested in
the next pass through std.log.
Thanks,
Andrei
More information about the Digitalmars-d
mailing list