Denis Koroskin wrote:
On Thu, 12 Nov 2009 19:49:58 +0300, dsimcha <[email protected]> wrote:
== Quote from Denis Koroskin ([email protected])'s article
I strongly believe that "No hidden allocation" policy should be
adopted by
D/Phobos (it is already adopted by Tango with a great success).
I can see the value in this, but two issues:
1. What counts as a "hidden" allocation? How non-obvious does it
have to be that
something requires an allocation? If something really has to allocate
and it's
not obvious from the nature of the function, is it enough to just
document it?
I can't give a formal definition of that, but for me a is allowed to
allocate if it produces something new or unique.
For example, void mkdirRecurse(string pathname) shouldn't allocate, but
it does, because the author didn't care about allocations when
implemented it.
Please bugzilla that, thanks. I'll fix.
Andrei