RFC: reference counted Throwable
Chris Cain via Digitalmars-d
digitalmars-d at puremagic.com
Sat Sep 20 20:39:28 PDT 2014
I'm just throwing a new ThisOutThereException:
What if we modified the exception hierarchy to have it so
"Throwable"s are GC allocated but there's an alternate set of
classes down another line that either must be manually managed or
are RC. Thus, there's no breakage.
Something like:
class Throwable : __UnifiedThrowable ...
class NoGCThrowable : __UnifiedThrowable ...
That way any code that's catching/handling Throwables doesn't
need to change but we start making it so that code that needs to
be NoGC handles the NoGCThrowable types. This would mean code
could be migrated gradually to the new method (and, if truly
desireable, the regular throwables could be deprecated
eventually).
Just an idea.
More information about the Digitalmars-d
mailing list