std.logger

SomeDude lovelydear at mailmetrash.com
Sat Aug 24 07:49:24 PDT 2013


On Thursday, 22 August 2013 at 22:01:09 UTC, Jonathan M Davis 
wrote:
> On Thursday, August 22, 2013 23:36:48 David Nadlinger wrote:
>> On Thursday, 22 August 2013 at 15:51:53 UTC, Craig Dillabaugh
>> 
>> wrote:
>> > Do you really find the three extra characters a big problem.
>> 
>> They are unnecessary. If you want to make clear you are dealing
>> with logging, you can just write something along the lines of:
>> 
>> import log = std.logger;
>> log.error("123");
>
> I'd oppose warning, critical, error, etc. because they're not 
> verbs like
> functions are supposed to be. It's variables or properties 
> which are nouns.
> So, while I agree that the module system makes it so that the 
> name clashes
> shouldn't be a big deal, I disagree with the names anyway and 
> would still
> prefer logWarning to warning.
>
> - Jonathan M Davis

OTOH, they are used in just about every logging API ever devised. 
Everybody knows what they mean. I just don't see the need to 
reinvent these words and make them longer by adding log. I 
seriously hate it.

It clutters code (once you've read your thousand's log 
instruction, it hurts), adds ugly and useless redundancy and 
nothing else to its understanding. This alone is far worse than 
not using verbs.


More information about the Digitalmars-d mailing list