RFC: reference counted Throwable

Mike Parker via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 20 00:48:48 PDT 2014


On 9/20/2014 1:43 PM, Andrei Alexandrescu wrote:
> On 9/19/14, 7:20 PM, Walter Bright wrote:
>> On 9/19/2014 6:48 PM, Andrei Alexandrescu wrote:
>>> On 9/19/14, 6:18 PM, Walter Bright wrote:
>>>> Having a compiler switch to change the behavior of every module in
>>>> incompatible ways would be a disastrous balkanization. It has to be
>>>> done
>>>> in such a way that the ARC and the existing exceptions can coexist.
>>>
>>> Could you please elaborate why the disaster? -- Andrei
>>>
>>
>> 1. Every library for D will have to come in two versions. One which
>> works, and the other is likely untested. This will divide the D
>> community in half.
>
> I understand where you're coming from. And you're right that we're
> looking at an important change - as big as -m64 vs. -m32 or porting to a
> new platform. It's big. But it's needed, soon. And it would be, it seems
> to me, a mistake to approach this big change as a small change that we
> can sneak in.
>
> This judgment - that RC vs. GC would balkanize the community - has
> become a prejudice that is worth revisiting. Just trotting it out again
> won't do.

Unless I'm missing something, Walter is referring specifically to the 
-nogc switch (or any such switch) and not to the concept of RC vs GC in 
general. And on that I am in strong agreement, FWIW.

Recall back during the D1/D2, Phobos/Tango period, library maintainers 
had to either choose which D version and library to support (D1/Phobos, 
D1/Tango, D2/Phobos) or come up with a means of supporting all of them. 
Wrapper modules and mixins were a workable (though terribly annoying) 
solution for some cases, but not all. It was a nasty mess.

I don't know yet what the ultimate impact of a -nogc switch would be on 
library maintenance, but I have a strong suspicion that simple wrapper 
modules and mixins wouldn't be enough to maintain compatibility. If 
there is even the slightest possibility that library maintainers will 
find themselves in that same situation of having to choose a or b 
because maintaining both is too troublesome to bother, then all the 
implications need to be hashed out beforehand.

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com



More information about the Digitalmars-d mailing list