Voting: std.logger

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 8 15:54:35 PDT 2014


On Monday, 8 September 2014 at 11:06:44 UTC, Robert burner 
Schadek wrote:
>> First part partially addressed - missing @nogc @nothrow logger 
>> implementation out of the box. Considering this request does 
>> not go very well with current language implementation it may 
>> be ignored for now but official stance about it must be 
>> clearly documented.
>
> at least for logf nothrow will not work because of a wrong 
> formatting string or args. log can not be nothrow because 
> custom toString for structs and class are allowed.
>
> nogc is not possible because of custom toString
>
> that won't fix, but for default types it is nogc.

It should be possible to provide custom implementation that 
throws ad Error for those cases (and thus fits the requirements) 
and `toString` has sink-based overload. Are there any reason why 
it doesn't help?


More information about the Digitalmars-d mailing list