On Mon, 08 Apr 2013 09:58:15 +0100, Manu <turkey...@gmail.com> 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. 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.

The hooks would ideally pass __FILE__ and __LINE__ information down from the call site in debug mode, etc.

R

--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Reply via email to