I'm trying to promote suggesting '@system' blocks instead of '@trusted'. '@trusted' functions, but '@system' blocks - which can only go in @trusted functions (@system block in @system functions are redundant). It's the same semantics, but it might win the day because the intent is to isolate the @system code, while still presenting a @trusted interface, as seems so important to the leadership.

That might be better than using @safe inside @trusted:

@trusted void myfunc() {
//implicitly safe
...
@system { //wouldn't compile otherwise.
   auto ptr = cast(ubyte*)4;
}

//implicitly safe again
}

Reply via email to