Rethinking the default class hierarchy: Milestone 2, Week 1

rikki cattermole rikki at
Mon Oct 25 05:56:19 UTC 2021

On 25/10/2021 6:48 PM, Tejas wrote:
> Sorry, I haven't been up to date with this project, but is one of the 
> goals of this project making classes available in `betterC` mode? I 
> think that will remove the need for extern(C++) classes and also factor 
> into making std.v2 betterC compatible and help make the entire D 
> ecosystem more coherent.


The reason extern(C++) classes work with -betterC and extern(D) does 
not, has to do with vtable's, not what members is in Object.

Anyway, even if extern(D) classes did work with -betterC, you won't get 
the standard library working with -betterC as a whole. Simply because it 
wouldn't be compiled in.

Of course one of the big issues with getting phobos working with 
-betterC is exceptions. There is no alternative and they require runtime 
stuff that just can't exist without a runtime.

More information about the Digitalmars-d mailing list