DIP 1028---Make @safe the Default---Community Review Round 1
Dominikus Dittes Scherkl
dominikus at scherkl.de
Thu Jan 2 13:47:24 UTC 2020
On Thursday, 2 January 2020 at 13:21:17 UTC, ag0aep6g wrote:
> Why would you suddenly be calling @system functions from @safe
> If all functions in your call chain are currently not marked,
> then you mark them all as @system for the DIP, and the code
> compiles just as it used to.
> If the calling function is currently marked as @safe but the
> called function isn't, then the chain already doesn't compile.
Yes! I fully support this DIP.
But at the same time, additionally @trusted as a function
attribute should be removed and replaced by @trusted expressions.
> Treating all legacy code as @trusted (when it was clearly
> @system before) would not be reasonable, in my opinion.
This should NOT be possible!
We would lose a lot of safety if even a few library developers do
that. @trusted should be restricted to as few code as possible,
at best only to the line of code where it is really necessary to
make a function @safe.
More information about the Digitalmars-d