misplaced @trust?
Zach the Mystic via Digitalmars-d
digitalmars-d at puremagic.com
Thu Feb 5 13:30:51 PST 2015
On Thursday, 5 February 2015 at 21:15:52 UTC, Steven
Schveighoffer wrote:
>> An aspect of a well-designed encapsulation is the number of
>> @trusted
>> interfaces is minimized. If you find an abstraction that has
>> @trusted
>> sprinkled liberally through it, it's an indicator of a failed
>> abstraction.
>>
>
> I think you just made this up :)
>
> But I agree that @trusted should be used sparingly not
> liberally. The problem is that when faced with such a huge
> function that calls one non- at safe one, marking the whole thing
> as @trusted disables all the mechanical verification for
> everything.
>
> There has to be a better way.
>
> -Steve
But it doesn't have to be accepted into D! :-)
More information about the Digitalmars-d
mailing list