digitalmars.D - Standard Library (Phobos) Garbage Collection
- crudbug (14/14) Apr 05 2012 Hi All,
- Jonathan M Davis (8/25) Apr 05 2012 The main place that Phobos uses the GC is with arrays. And arrays are so...
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
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