On Wednesday, 27 May 2020 at 13:47:46 UTC, Claude wrote:
On Wednesday, 27 May 2020 at 13:42:08 UTC, Andrej Mitrovic wrote:
Is the actual problem those `@trusted:` declarations at the top of C headers?

There could be a simple solution to that:

Ban `@trusted:` and `@trusted { }` which apply to multiple symbols. Only allow `@trusted` to apply to a single symbol. For

IMO, it makes things worse. Because the careless programmer will slap @trusted to every declaration (maybe with a script or find/replace macro of his editor). So now, we don't know if the annotation is greenwashing or careful examination of the definition.

The difference is when adding new symbols. If version control is used, it would be very obvious in a review whether a new @trusted symbol was added or not. A diff typically shows several lines of context, and a toplevel `@trusted:` is easy to miss.

Reply via email to