C++ to D

Jeff Jones via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 31 13:37:36 PDT 2015


Is it possible to modify either a C++ compiler or in code to make 
classes more D ish? e.g., instead of just the vtable(which, IIRC 
is slightly different between the two) add the metadata pointer 
and whatever else?

What I'm getting at, is there a somewhat simple way(not creating 
a new C++ but either through macros, small compiler changes, or 
whatever) to make C++ objects D compatible instead of the other 
way?

I.e., we can't take anything away from D classes since we will 
break D. But we should be able to add to C++ classes without 
breaking C++. If we can add the info that D needs then both 
should get along happily? I'm mainly talking about a simple code 
based solution but I'm also curious about how easily this would 
be by compiler modification.



More information about the Digitalmars-d mailing list