DIP1028 - Rationale for accepting as is
Atila Neves
atila.neves at gmail.com
Tue May 26 11:09:47 UTC 2020
On Monday, 25 May 2020 at 17:01:24 UTC, Panke wrote:
> On Monday, 25 May 2020 at 16:29:24 UTC, Atila Neves wrote:
>> A few years ago I submitted several PRs to Phobos to mark all
>> unittests that could with @safe explicitly. I'd say that was a
>> good example of nobody reviewing them for their @systemness.
>
> Ideally you should be able to blindly mark every function
> definition with @safe, because the compiler will catch you if
> you fall. Only if you type @trusted you should need to be
> careful.
Doesn't work for templated functions since their @safety might
depend on the the particular instantiation (consider
std.algorithm.map).
More information about the Digitalmars-d-announce
mailing list