D is our last hope

Timon Gehr timon.gehr at gmx.ch
Tue Jan 2 00:49:21 UTC 2024


On 12/11/23 10:49, Siarhei Siamashka wrote:
> You can have `@trusted` callbacks in this case. It's just a matter of 
> adding this attribute to each function after making an effort to attest 
> that the function looks bug free despite using dangerous language features.

This is a misunderstanding. Not every function that does not have memory 
bugs can be `@trusted`. This is because the interface of the function 
may be intentionally unsafe, i.e., there may be wrong ways to use the 
function, such that it has undefined behavior.


More information about the Digitalmars-d mailing list