On Saturday, 1 November 2014 at 17:35:37 UTC, David Nadlinger
wrote:
There is still a critical issue with std.experimental.logger
that would prevent it from being merged right now: The abuse of
@trusted all over the code.
For example, the following piece of code compiles with
burner/logger@c87e1032:
---
import std.experimental.logger.core;
struct Dangerous {
string toString() {
*(cast(int*)0xdeadbeef) = 0xcafebabe;
return null;
}
}
void main() @safe {
logf("%s", Dangerous());
}
---
To be quite honest, I'm rather disappointed that I was able to
break @safe-ty
with the first, most straightforward piece of code I tried.
Sure, many people don't understand how dangerous @trusted
applied to templates really is. But this issue has already been
pointed out multiple times in Robert's code, both in this pull
request and other unrelated ones.
David
Oh, I have actually completely missed that. It is critical
indeed. Will try having a look myself and possibly providing
patches.