Review: std.logger

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 12 14:23:29 PDT 2014


On 7/12/14, 10:19 AM, H. S. Teoh via Digitalmars-d wrote:
> On Sat, Jul 12, 2014 at 06:13:28PM +0200, Sönke Ludwig via Digitalmars-d wrote:
>> Overall looks good to me. Some points that haven't been mentioned so far in
>> this review round:
>>
>>   - Using a class with static members doesn't seem to be very
>> idiomatic. It seems like the three member properties can simply be
>> made global and everything should be fine - the "LogManager." prefix
>> doesn't really add information. This has been mentioned in the last
>> review round and it's not a very important point in this particular
>> instance, but we should really make a decision here that will also
>> decide how future modules go about this.
> [...]
>
> +1. If something is a global, just call it a global. There's no need to
> be ashamed of that. Classes with only static members sound to me like
> forcing round pegs into square holes.

I agree. This is not Java. That idiom must go. -- Andrei



More information about the Digitalmars-d mailing list