On Friday, 2 July 2021 at 00:26:52 UTC, someone wrote:
... just wondering:
...

Imho, if you want all of the app to be safe, and you cannot avoid unsafe code, then there are two choices: 1. Mark the method doing unsafe stuff as @trusted, or pieces of code which are unsafe with trusted lambda hack.
2. Mark the top caller of your @system methods as @trusted.

In both cases, unsafe code should be manually checked as best as it can be done. Best is to think twice whether you can redesign your code to avoid unsafe operations.

On PR review step if there is such thing for your app, reviewers should carefully review those @trusted blocks of code.

Oh well, and tests, tests and more tests, i.e. It should be thoroughly tested.

Best regards,
Alexandru.

Reply via email to