ImportC and nothrow/@nogc?

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Mon Aug 26 05:46:34 UTC 2024


On 26/08/2024 5:42 PM, Walter Bright wrote:
> On 8/24/2024 10:29 AM, Richard (Rikki) Andrew Cattermole wrote:
>> So you need annotated scopes inside of it, to do the naughty thing.
> 
> We did that with @trusted lambdas.
> 
> The result was @safe turned into a joke.

That doesn't sound like what I was suggesting there.

To clarify:

```d
void func() @trusted {
	@trusted {
		unsafe_thing;
	}

	safe_only_thing;
	unsafe_thing; // Error
}
```

Not:

```d
void func() @safe {
	@trusted {
		unsafe_thing;
	}
}
```


More information about the Digitalmars-d mailing list