On Saturday, 27 September 2014 at 18:33:24 UTC, Jacob Carlborg
wrote:
On Saturday, 27 September 2014 at 11:34:32 UTC, IgorStepanov
wrote:
C++ exception mechanism uses C++ type_info objects. We can
inherit object.Throwable from std::exception (through
extern(C++) interface), override the what() method, but there
are no way to generate C++ type_info for D class now. If we
want to do a compiler support of C++ exceptions, we should
implement and support another one non-standartized feature:
type_info. BTW it allows to do dynamic_cast over C++ classes
in D, but I think, nobody approve this suggestion, because it
can be hard).
Objective-C can do it somehow. If they can do it I'm sure we
can as well.
--
/Jacob Carlborg
If someone from D commanders bless me, I can start to exploring
and implementing std::type_info for D classes. If we made it, we
will implement 50% of C++ exception handling.