On Tuesday, 10 July 2018 at 13:24:43 UTC, WebFreak001 wrote:
It's supposed to make webservers safe and not crash because of
segmentation faults, etc.
If you still want to write code like you are used to and don't
care about that in your webserver, just mark everything in the
implementation @trusted (but @safe in the interface) and it
will be fine.
I understand the motivation of this and this motivation is
undoubtly correct.
The problem is when you use the libraries, especially those
interfacing with C code. The intention of @trusted is to use it
to mark the code that *is* memory safe, but it cannot be verified
automatically by the compiler (for example required checks are
done before an array access).
That's why there is a problem with the libraries that are *not*
safe - or at least I don't know the code and cannot verify that
they are.