Shouldn't safety be the default.
Siarhei Siamashka
siarhei.siamashka at gmail.com
Wed Dec 27 08:29:28 UTC 2023
On Wednesday, 27 December 2023 at 07:42:31 UTC, Walter Bright
wrote:
> @safe code is just as fast as @system code. You might be
> thinking about the switch that turns runtime array bounds
> checking on/off.
>
> Yes, safety should be the default, but we don't want to break
> existing code.
My understanding is that people are suggesting a new global
compiler switch to optionally disable safety (allow `@system` and
`@trusted` to be called from `@safe`), which would indeed allow
compiling old abandoned libraries and use them from the new code
during the transition period.
More information about the Digitalmars-d
mailing list