Phobos for Review: std.buffer.scopebuffer

Walter Bright newshound2 at digitalmars.com
Sun Feb 9 12:24:05 PST 2014


On 2/9/2014 4:30 AM, Jacob Carlborg wrote:
> * Could we put this in a more general package, like
> std.memory.buffer.scopebuffer. Then the upcoming std.allocator could be placed
> in std.memory.allocator

In druntime there are many examples of deeply nested packages. Personally, I 
never can remember which one a particular module is in and are always using 
directory searches to find them. I much prefer a flatter structure.

Besides, I don't see that buffers are a subset of memory allocation strategies, 
I think they're orthogonal.


> * Do we have any uses for this in druntime? Perhaps move core.memory to
> core.memory.gc and put this module in core.memory.buffer.scopebuffer.

Of course, the distinction between druntime and phobos is a bit arbitrary, but 
given that lots of buffer types are coming, I don't see much value in having 
some buffer types in druntime and some in phobos.



More information about the Digitalmars-d mailing list