News for hackers. Stuff that matters.
Re:Organizations Using the D Language by mhh__ on Tuesday February 16, 2021 @05:35PM (#26159646)
The principle is a combination of pragmatism, pain, and then realisation that all memory allocation is slow (allocate less memory).

Lots of D code is fundamentally lazy.

Re:Organizations Using the D Language by WalterBright on Tuesday February 16, 2021 @05:45PM (#26159755)
The fastest memory allocator is no-allocation allocation. D has some cool methods for doing that, like the chain template and voldemort types.

For example, chain can be used to "concatenate" two arrays without allocating a byte.

https://dlang.org/phobos/std_range.html#chain

https://wiki.dlang.org/Voldemort_types