D Editions

Atila Neves atila.neves at gmail.com
Mon Jun 3 16:05:28 UTC 2024


On Saturday, 1 June 2024 at 21:14:38 UTC, Timon Gehr wrote:
> On 5/30/24 20:31, Atila Neves wrote:
>> https://github.com/atilaneves/DIPs/blob/editions/editions.md
>> 
>> Destroy
> - How do you compile different modules with different editions 
> on the same command line?

If they all have module declarations, it's handled there, 
otherwise I hadn't thought of that. Do you think that will be 
common? I'm not sure it will be.

> - How would a library expose different interfaces to importers 
> that use different editions? (This may be required because 
> different editions allow different interface designs and 
> guarantees, or have a different user-accessible druntime 
> interface and e.g. druntime types are in the library API.)

Good question. I guess we'll need some kind of 
`version(Edition2024)`.

> - How does a newer edition with less `@safe` bugs treat `@safe` 
> code from an older edition that has more memory safety holes?

I think I'd need a concrete example.

> - How do function interfaces work when some type annotations 
> exist in only either the language edition of the caller or the 
> language edition of the callee? E.g. think DIP1000 is in one 
> edition but not in another.

The semantics of the edition of the callee apply.




More information about the dip.ideas mailing list