Hacker News new | past | comments | ask | show | jobs | submit login

That's changing. The standard library is almost entire GC-free now.



That's a little adventurous. std.algorithm is known to only have one function which allocates.

The rest of Phobos is being looked at, but to this point I don't think it has been combed thoroughly enough to say "almost entire."


Yeah. The "almost entire" applies to std.algorithm. How much allocation goes on elsewhere depends on what module you're talking about. Some definitely avoid it, whereas others definitely require it. That will be (and has been) changing though. The main thing is probably going to be making much heavier use of output ranges rather than automatically allocating arrays/strings. We'll get there though, because there's clearly a lot of interest in doing so, and there's no fundamental reason why we can't.


I'm not sure where you got that idea but that's not true. The standard library make heavy usage of the GC. There is talk of implementing ARC to replace or supplement the GC and the standard library will most likely soon start using output ranges to avoid forced GC allocations in many cases but that hasn't happened yet.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: