RFC: reference counted Throwable

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 20 00:29:51 PDT 2014


On Saturday, 20 September 2014 at 04:53:32 UTC, Andrei 
Alexandrescu wrote:
> On 9/19/14, 8:30 PM, ketmar via Digitalmars-d wrote:
>> On Fri, 19 Sep 2014 08:32:38 -0700
>> Andrei Alexandrescu via Digitalmars-d 
>> <digitalmars-d at puremagic.com>
>> wrote:
>>
>>> First, there must be some compiler flag -nogc or something, 
>>> which
>> please, no compiler switches! it's partly ok for "-release", 
>> it's not
>> very good for "-version" and it's awful to add another one 
>> which
>> completely alters the way something works. as much as i want 
>> to make
>> throwables nogc, it's better to change nothing than to add 
>> such switch.
>
> Changing nothing is not an option. Ideas? -- Andrei

I have been thinking about something like `ARC` interface and 
`ARCException : Throwable, ARC` with all the automatic ref 
inc/dec calls you have mentioned added for any class that 
implements `ARC` interface.


More information about the Digitalmars-d mailing list