The problem at hand here is escape analysis. The compiler must be able to ensure that a reference doesn't escape the RC mechanism in an uncontrolled manner. I'd like to add such mechanism to the language rather than bake in reference counting, as it can be used to solve other problem we are facing today (@nogc exception for instance).
I've made the claim that we should implement reference counting
as a library many time, so I think I should explicit my position.
Indeed, RC require some level a compiler support to be safe. That
being said, the support does not need to be specific to RC. On
fact, my position is that the language should provide some basic
mechanism on top of which safe RC can be implemented, as a
library.
- Re: Safe reference cou... Andrei Alexandrescu via Digitalmars-d
- Re: Safe reference... Walter Bright via Digitalmars-d
- Re: Safe reference countin... Martin Nowak via Digitalmars-d
- Re: Safe reference cou... Martin Nowak via Digitalmars-d
- Re: Safe reference... rsw0x via Digitalmars-d
- Re: Safe reference... deadalnix via Digitalmars-d
- Re: Safe reference... Andrei Alexandrescu via Digitalmars-d
- Re: Safe reference cou... Andrei Alexandrescu via Digitalmars-d
- Re: Safe reference... rsw0x via Digitalmars-d
- Re: Safe refe... Andrei Alexandrescu via Digitalmars-d
- Re: Safe reference counting cannot ... deadalnix via Digitalmars-d
- Re: Safe reference counting ca... PuglyWUgly via Digitalmars-d
- Re: Safe reference countin... Namespace via Digitalmars-d
- Re: Safe reference countin... Ola Fosheim Grøstad via Digitalmars-d
- Re: Safe reference countin... Jonathan M Davis via Digitalmars-d
- Re: Safe reference cou... rsw0x via Digitalmars-d
- Re: Safe reference... deadalnix via Digitalmars-d
- Re: Safe reference... Andrei Alexandrescu via Digitalmars-d
- Re: Safe refe... rsw0x via Digitalmars-d
- Re: Safe ... Andrei Alexandrescu via Digitalmars-d
- Re: Safe ... rsw0x via Digitalmars-d
