@trusted considered harmful

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Jul 28 06:47:03 PDT 2012


On 7/28/12 7:05 AM, Artur Skawina wrote:
> On 07/28/12 02:08, David Nadlinger wrote:
>> @trusted in its current form needs to go. Its design is badly broken, as it leaks implementation details and encourages writing unsafe code.
>
> The problem with @trusted is that it is transitive.
>
> @trusted should allow unsafe operations in the covered scope (right now -
> the function), but disallow calling unsafe (@system) code.

No. Trusted means "hand-checked, good to go". It can do anything.

Andrei


More information about the Digitalmars-d mailing list