RFC: reference counted Throwable

Ola Fosheim Grostad via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 20 00:17:46 PDT 2014


On Saturday, 20 September 2014 at 06:01:19 UTC, Walter Bright 
wrote:
> This doesn't address any of the 3 concerns.

1. RC efficiency is architecture dependent. E.g. TSX is coming 
even if there is a bug in lower end CPUs. Suggest making 
performance oriented prototypes on different architectures before 
concluding.

2. As long as you have a RC pointer to an obj on the stack you 
can switch to regular references. No magic involved for the easy 
case, just semantic analysis.

3. True, but you can keep the refcount at a negative offset for 
new-based allocations. Besides it only affects those who do @nogc 
and they should know what they are doing.


More information about the Digitalmars-d mailing list