The future of @safe by default [was Re: dip1000 ...]

Mike Parker aldacron at gmail.com
Tue Jun 14 01:55:01 UTC 2022


On Monday, 13 June 2022 at 23:44:51 UTC, Paul Backus wrote:

> syntax, we can adopt some new syntax for it (`@safe module 
> foo;`? `default(@safe):`?).

Adding the attributes to the module statement works, but I'd like 
to see it this way:

```d
module foo default @safe nothrow;
```

The `default` must follow the module name, and the attributes 
must follow the `default`. Having a single pattern for it 
increases readability. You don't have to scan the line to pick 
out the module name since it's always second, and the `default` 
visually marks the beginning of the attribute list.


More information about the Digitalmars-d mailing list