On 8 April 2013 20:57, Regan Heath <[email protected]> wrote: > On Mon, 08 Apr 2013 09:58:15 +0100, Manu <[email protected]> wrote: > >> I suspect Andrei for one knows this, and that's why the D containers are >> so... barely existing. The language is not yet ready to say with >> confidence >> how they should look. >> > > That, and before you can design the containers you need a concrete > allocator interface design. Actually, this is likely the same blocker for > GC-free D as well. > > D should have a set of global allocator hooks.
True. I've been saying for a long time that I'd really like filesystem hooks too while at it! If it did, you could easily catch unexpected allocations in tight loops and > realtime code. If it did, GC-free D would be trivial - just replace the > default GC based allocator with a malloc/free one, or any other scheme you > like. > D doesn't have a delete keyword, which is fairly important if you want to manually manage memory... The hooks would ideally pass __FILE__ and __LINE__ information down from > the call site in debug mode, etc. >
