Editions Ideas

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Sat Dec 20 16:55:28 UTC 2025


On 21/12/2025 12:33 AM, Derek Fawcus wrote:
> On Saturday, 20 December 2025 at 10:59:52 UTC, sighoya wrote:
>> On Friday, 19 December 2025 at 17:28:43 UTC, Richard (Rikki) Andrew 
>> Cattermole wrote:
>>> Here is my proposed plan:
> 
> [...]
> 
>> How does it work if you pass an object to a module with an older 
>> edition expecting a specific root class and also when you receive a 
>> newly created object from the said module?

It will error.

Just like with any other type, including extern(C++) classes.
> Would it maybe require changing the D name mangling scheme when 
> generating code in such cases so that the symbols simply fail to link 
> if/when cross-edition incompatible code is mixed?
> 
> DF

This is far too complex for the problem at hand.

A class hierarchy is determined at the point of declaration.

It does not changed based upon who imports it.

As long as the module is known what its edition is, and the class 
declaration for both itself and any parents are kept in good state, 
it'll remain the same.



More information about the Digitalmars-d mailing list