Struct inheritance

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Thu Sep 19 19:04:40 UTC 2024


On 20/09/2024 6:57 AM, Nick Treleaven wrote:
> This seems like |alias this| in disguise.

The problem with alias this, is it is not defined as the fallback when 
nothing else in the hierarchy matches.

Here it is better defined, opDispatch should only be chosen after 
exhausting the hierarchy, both in classes and structs.

Eliminating the issues with alias this from the design.

We can further restrict it, to only support the parent most type in the 
hierarchy or only one in the hierarchy. In effect it allows adding a new 
parent to the top of the hierarchy.



More information about the dip.ideas mailing list