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.

Reply via email to