www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Standard Library (Phobos) Garbage Collection

reply "crudbug" <crudbug gmail.com> writes:
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.

-Adam
Apr 05 2012
parent Jonathan M Davis <jmdavisProg gmx.com> writes:
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
Apr 05 2012