Standard Library (Phobos) Garbage Collection

Jonathan M Davis jmdavisProg at gmx.com
Thu Apr 5 20:29:39 PDT 2012


On Friday, April 06, 2012 05:20:35 crudbug wrote:
> Hi All,
> 
> First off.. I am not against garbage collection :)
> 
> With mobile platforms becoming more prevalent. The battery power
> is the most essential asset that we need to use frugally. IOS
> shines in this category and Android's VM approach does not give
> us that much juice.
> 
> D is a great step towards having both, productivity and
> performance for our dinner. I feel a standard library which does
> not use GC by default, provides an option of managing the code
> manually (good for mobile development). By providing this option,
> programmers can use std library always and the option of going
> manual or GC totally depends upon them.
> 
> Any thoughts are much appreciated.

The main place that Phobos uses the GC is with arrays. And arrays are so 
crippled without the GC that it's not even funny (particularly with regards to 
slices). There's no way that Phobos isn't going to use the GC.

Now, outside of arrays, I believe that its GC usage is fairly light. The main 
other issue is containers, and we're going to have custom allocators to solve 
that. So, GC usage and containers shouldn't be an issue in the long run.

- Jonathan M Davis


More information about the Digitalmars-d mailing list