DIP1028 - Rationale for accepting as is
Timon Gehr
timon.gehr at gmx.ch
Mon May 25 00:56:04 UTC 2020
On 24.05.20 10:55, Walter Bright wrote:
> I infer your position is the idea that putting @trusted on the
> declarations isn't greenwashing, while @safe is.
> ...
It's only greenwashing if it's misleading. Putting @safe is a lie,
putting @trusted is honest.
> I can't see a practical difference between:
>
> @safe extern (C) void whatevs(parameters);
> @trusted extern (C) void whatevs(parameters);
>
> Both require that whatevs() provide a safe interface. The difference
> between them is in the implementation of those functions, not the
> interface. Since the D compiler cannot see those implementations, they
> are immaterial to the compiler and user.
Sure, that's the point. Your @safe by default DIP in practice makes
certain declarations @trusted by default. @safe is a fine default.
@trusted is a horrible default. That's why your DIP claims it is for
@safe by default (and not @trusted by default). Except in this one weird
special case, where it introduces @trusted by default.
More information about the Digitalmars-d-announce
mailing list