Our template emission strategy is broken

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 11 16:45:56 PST 2015


On Wednesday, 11 November 2015 at 17:19:51 UTC, Iain Buclaw wrote:
> Please no.  I've done my fair share of investigating this in 
> libunwind, and it just isn't worth it.

Ok I know Walter won't listen, and I wouldn't be as radical as 
Iain, but I concur. There are thing that can be done to improve 
C++ and D interrop with Exception. For instance, SDC makes sure 
that C++ exception unwind properly through D and vice versa, but 
don't allow to catch across language.

There is a reason for that. To be able to catch C++ exceptions, 
you need to duplicate the whole RTTI mechanism from C++ + runtime 
support for it + hook oneself in the C++ runtime to signal 
catching and rethrowing.

This is definitively not impossible, but the cost benefit ratio 
is such as I wouldn't prioritize this. There are definitively 
more way to have impact without summoning a Golem when it comes 
to C++ interrop.


More information about the Digitalmars-d mailing list