Review: std.logger

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 14 08:37:00 PDT 2014


On Monday, 14 July 2014 at 15:34:12 UTC, Dicebot wrote:
> On Monday, 14 July 2014 at 14:24:39 UTC, Jacob Carlborg wrote:
>> On 14/07/14 11:35, Dicebot wrote:
>>
>>> Yes, something like separate "partially static" import type.
>>
>> I doesn't need language support. Just have a single function, 
>> "log", which returns a struct. The struct have all the 
>> "error", "warning" and so on, functions.
>
> It is exactly what I don't want to see, it is an aberration. 
> Never ever.
>
> D unit of encapsulation is module. Any other "namespace" 
> solutions must die after proper torture. However we do miss 
> sane built-in compromise between overly verbose static imports 
> and overly clashing normal imports - this need to be solved via 
> language feature in the long term because it is fundamental 
> module system use case.

One option could be to relax `static import` to allow 
module-qualified usage too. Until then `import mod = pkg.mod;` is 
a good simple idiom that fits existing module system.


More information about the Digitalmars-d mailing list