Editions Ideas

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Dec 16 20:43:21 UTC 2025


On 17/12/2025 9:11 AM, Nick Treleaven wrote:
> On Monday, 15 December 2025 at 21:30:18 UTC, Dukc wrote:
>>  - Maybe C-style alias declarations. The parser will still have to 
>> recognise them as it can't know which edition the file has but still.
> 
> https://github.com/dlang/dmd/pull/22244
> 
> The parser can tell when it is specified in the file. The compiler 
> should set the `Module.edition` field before the parser receives the 
> `Module` instance when a matching `-edition` or `-E` flag is passed. 
> AFAICT `-edition` seems to be supported but ignored currently in recent 
> git dmd, and `-E` isn't implemented. I'll file a bug.
> 
> ...
>>  - `@safe` external functions that don't have a D linkage (they would 
>> have to be designated `@trusted` instead).
> 
> +1
> 

It is implemented. Walter did it.

https://github.com/dlang/dmd/blob/063ee15f6fa93c270f475bffd646b58e61e1294d/compiler/src/dmd/cli.d#L353

https://github.com/dlang/dmd/blob/063ee15f6fa93c270f475bffd646b58e61e1294d/compiler/src/dmd/mars.d#L897

As far as I'm aware editions is fully implemented.


More information about the Digitalmars-d mailing list