On 6/7/2016 11:19 AM, Jack Stouffer wrote:
On Tuesday, 7 June 2016 at 18:15:28 UTC, Walter Bright wrote:
@trusted and @system are designed to be greppable, i.e. you can look for them
without needing a static analysis tool.
But you can't grep for @system because 99% of the time it's implicit. This
problem becomes harder to find when using templates for everything, which I do.
Add:
@safe:
at the top of your D module and you'll find the @system code. The D compiler is
the static analysis tool. It's true that @safe should have been the default, but
too much code would break if that were changed. Adding one line to the top of a
module is very doable for those that are desirous of adding the safety checks.
You can also add:
@nogc:
at the top, too. It isn't necessary to tediously annotate every function.