On Sunday, 2 November 2014 at 13:06:24 UTC, Dicebot wrote:
I had initial go at cleaning safety attributes : https://github.com/Dicebot/phobos/tree/logger-fix-trust

It still needs one druntime PR merged (https://github.com/D-Programming-Language/druntime/pull/1009) to be done properly but should be ready for destruction.

David snipet results in this after all changes:
std/experimental/logger/core.d(1675): Error: safe function 'std.experimental.logger.core.Logger.logf!(11, "aaa.d", "aaa.main", "void aaa.main() @safe", "aaa", Dangerous).logf' cannot call system function 'std.format.formattedWrite!(MsgRange, char, Dangerous).formattedWrite'

I don't recall off the top of my head some non-template innards actually might require @safe, but apart from that, why not just leave the job to template attribute inference entirely? If somebody wants to log a type with a @system toString in non-@safe code, why not just let them?

David

Reply via email to