Idea #1 on integrating RC with GC

Mike none at none.com
Wed Feb 5 16:42:09 PST 2014


On Wednesday, 5 February 2014 at 20:23:13 UTC, Michel Fortin 
wrote:

>
> What you want is simply to replace the current GC with another 
> implantation, one that uses ARC. It shouldn't affect user code 
> in any way, it's mostly an implementation detail (managed by 
> the compiler and the runtime).

Yes.

>
> To me it seems you're trying to address a third problem here: 
> that people have complained that Phobos relies on the GC too 
> much.

Yes.

> This comes from people who either don't want the GC to pause 
> anything, or people who want to reduce memory allocations 
> altogether. For the former group, replacing the current GC with 
> an ARC+GC scheme at the language level, with the possibility to 
> disable the GC, will fix most of Phobos (and most other 
> libraries) with no code change required.

Yes.

> For the later group, you need to make the API so that 
> allocations are either not necessary, or when necessary provide 
> a way to use a custom an allocator of some sort.

... and Yes


More information about the Digitalmars-d mailing list