@safe by default

Dukc ajieskola at gmail.com
Fri May 31 11:42:13 UTC 2024


Nick Treleaven kirjoitti 31.5.2024 klo 12.18:
> @safe should mean mechanically checked for accidental memory-safety 
> violations - that is a more useful definition. Allowing non-extern(D) 
> linkage prototypes to be @safe breaks that principle and makes @safe 
> prototypes a minefield.

I agree in principle, but note this is orthogonal to the DIP. D allows 
declaring external C functions as `@safe` right now. The DIP should not 
make it any worse, and it also doesn't prevent a separate proposal that 
would say that external non-D linked functions must be either `@trusted` 
or `@system`.


More information about the dip.ideas mailing list