Escaping the Tyranny of the GC: std.rcstring, first blood

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 17 09:30:08 PDT 2014


On Monday, 15 September 2014 at 02:26:19 UTC, Andrei Alexandrescu 
wrote:
> Walter, Brad, myself, and a couple of others have had a couple 
> of quite exciting ideas regarding code that is configurable to 
> use the GC or alternate resource management strategies. One 
> thing that became obvious to us is we need to have a reference 
> counted string in the standard library. That would be usable 
> with applications that want to benefit from comfortable string 
> manipulation whilst using classic reference counting for memory 
> management. I'll get into more details into the mechanisms that 
> would allow the stdlib to provide functionality for both GC 
> strings and RC strings; for now let's say that we hope and aim 
> for swapping between these with ease. We hope that at one point 
> people would be able to change one line of code, rebuild, and 
> get either GC or RC automatically (for Phobos and their own 
> code).

Ironically, strings have been probably least of my GC-related 
issues with D so far - hard to evaluate applicability of this 
proposal because of that. What are typical use cases for such 
solution? (not questioning its importance, just being curious)


More information about the Digitalmars-d mailing list