@safe by default

Nick Treleaven nick at geany.org
Fri May 31 09:21:54 UTC 2024


On Friday, 31 May 2024 at 09:18:17 UTC, Nick Treleaven wrote:
> Module 2:
> ```d
> @safe extern(C) void ext(int* p);
>
> void main() // implicitly @safe
> {
>     int i;
>     ext(&i); // boom
> }
> ```

Sorry, that doesn't compile even with -dip1000. But this does:

```d
     auto p = new int;
     ext(p); // boom
```


More information about the dip.ideas mailing list