Non-techincal brain, is @safe by default good or not?
Bruce Carneal
bcarneal at gmail.com
Wed May 27 16:39:04 UTC 2020
On Wednesday, 27 May 2020 at 16:13:31 UTC, Bruce Carneal wrote:
> On Wednesday, 27 May 2020 at 15:57:12 UTC, aberba wrote:
>> [...]
>
> I think it's simpler. Currently, @safe means "machine
> checked". Post 1028 @safe means "machine checked unless you
> call a C library, or anything you call calls a C library or
> anything that...". Post 1028 the compiler treats all unmarked
> extern(C) routines as if they had been machine verified. Since
> they have not been machine verified, and in most cases can not
> be machine verified even if the source code were available, the
> post 1028 compiler is complicit in propagating dangerous code.
>
> To be clear, I like @safe by default. I just don't like the
> compiler lying to me. DIP 1028 could be altered to remove the
> problem but Walter, at least to date, refuses.
To answer your question more directly: I believe @safe by default
could be a wrenching change for current dlang coders but would be
especially beneficial to less experienced newcomers in the
future. OTOH, @safe by default as proposed in DIP 1028 would be
a problem for almost everyone in the dlang community.
More information about the Digitalmars-d
mailing list