@trust is an encapsulation method, not an escape
via Digitalmars-d
digitalmars-d at puremagic.com
Fri Feb 6 08:26:51 PST 2015
On Friday, 6 February 2015 at 16:19:26 UTC, John Colvin wrote:
> I can instantly see this happening:
>
> void foo() @trusted
> {
auto p = malloc(…)
> @safe
> {
global_datastructure.push(p)
> //loads of code
> }
>
free(p)
> //a few lines of system code, only safe due to context in
> the @safe blocks
>
> @safe
> {
> \\loads of code
> }
> }
>
> Is that what we want?
Nope.
More information about the Digitalmars-d
mailing list