RFC: reference counted Throwable

Daniel N via Digitalmars-d digitalmars-d at puremagic.com
Fri Sep 19 20:13:26 PDT 2014


On Saturday, 20 September 2014 at 02:26:49 UTC, Walter Bright 
wrote:
> Good question. It's a challenge. But it has to be done, or D 
> will divide in half and both halves will fail.
>
>
> We've had this discussion numerous times before - "throw the 
> magic compiler switch" and D becomes an ARC system and 
> everything is wonderful. It cannot work. ARC and GC are not 
> equivalent.

I basically agree with Walter on this one, no switch please, it's 
maintenance nightmare for library devs.

My proposal would be to permanently use ARC for Throwable, no 
flags.

What does the GC bring to exceptions that makes it sufficiently 
invaluable to warrant two parallel implementations? It can't be 
about performance, since _thrown_ exceptions are already in the 
slow path... Backwards compatibility?


More information about the Digitalmars-d mailing list