Do we really need @unsafe?
Walter Bright
newshound1 at digitalmars.com
Tue Nov 10 16:04:54 PST 2009
bearophile wrote:
> Walter Bright:
>
>> Furthermore, why would a safe module wish to expose unsafe functions?
>> Shouldn't the programmer instead be obliged to produce trusted functions
>> in it?
>
> If what you say is right, then what's the purpose/advantage of using:
> module foo;
> @safe:
>
> Instead of this?
> module(safe) foo;
...unsafe functions...
@safe:
...safe functions...
@trusted:
...trusted functions...
More information about the Digitalmars-d
mailing list