SLF4D - A proposal for a common logging interface for Dub projects

Andrew andrewlalisofficial at gmail.com
Sat Feb 25 12:20:22 UTC 2023


On Saturday, 25 February 2023 at 09:32:18 UTC, max haughton wrote:
> On the contrary I would argue that it's much easier (not 
> necessarily better) to provide extensibility using classes. 
> Nobody ever got fired for writing a class, as the saying goes.

I'd actually sort of agree with you here, but my opinion (which 
isn't necessarily correct, mind you) is that it's better to 
provide a fixed interface (a struct with a set of pre-defined 
methods) for developers to use, than to let them use a class 
which could be extended from another. Essentially I just tried to 
make the developer-experience as simple as possible, while 
letting logging providers customize pretty much everything that 
happens after a log message is generated.


More information about the Digitalmars-d-announce mailing list