@trust is an encapsulation method, not an escape

David Nadlinger via Digitalmars-d digitalmars-d at puremagic.com
Fri Feb 6 08:40:08 PST 2015


On Friday, 6 February 2015 at 16:11:31 UTC, Andrei Alexandrescu 
wrote:
> On 2/6/15 3:57 AM, Martin Krejcirik wrote:
>> If I understand it correctly, Walter is against adding trusted 
>> blocks
>> (trusted {...}) into @safe functions. But what about having 
>> safe blocks
>> in @trusted functions ?
>
> That would be sensible - perhaps the best step forward 
> following this long discussion. -- Andrei

This still does not solve the template inference problem though, 
unless you make it a "non- at trusted" block instead of requiring 
@safe-ty. And then you'd end up with the—at least to my 
eyes—rather absurd situation that a template function that is 
marked @trusted might actually end up being @system.

David


More information about the Digitalmars-d mailing list