Typical security issues in C++: why the GC isn't your enemy
Siarhei Siamashka
siarhei.siamashka at gmail.com
Mon Jan 23 03:19:07 UTC 2023
On Sunday, 22 January 2023 at 21:02:06 UTC, Dom Disc wrote:
> The difference is only
>
> @trusted fn() {
>
> };
>
> vs.
>
> @safe fn() { @trusted {
>
> } };
The second variant looks more verbose and more ugly to me. Also
wouldn't it require an extra level of indentation if properly
formatted?
> But what we gain is that @save/@system is then a binary
> attribute and not a cumbersome tri-state anymore. Everything is
> either safe or not.
Dropping support for the @trusted function attribute even after
some deprecation period would be a rather annoying compatibility
breaking change. That's a high price for something that is just
cosmetics.
Also how do you imagine writing future code that is compatible
with both the most recent versions of D compilers and also with
GDC 12 (frontend version 2.100)? GDC 12 is included in Ubuntu
22.04 LTS and will be relevant for a very long time.
More information about the Digitalmars-d
mailing list