On Monday, 12 May 2014 at 17:03:18 UTC, Walter Bright wrote:
On 5/12/2014 2:12 AM, Dicebot wrote:
I think this is more of library writing culture problem than
engineering
problem. High quality library shouldn't rely on any internal
allocations at all,
deferring this decision to user code. Otherwise you will
eventually have
problems, GC or not.
Consider my PR:
https://github.com/D-Programming-Language/phobos/pull/2149
This is exactly what it does - it 'pushes' the decisions about
allocating memory up out of the library to the user. I suspect
a great deal of storage allocation can be removed from Phobos
with this technique, without sacrificing performance,
flexibility, or memory safety. (In fact, it improves on
performance and flexibility!)
We have already had discussion where I did state that current
@nogc implementation is not robust enough and failed to explain
the use case for weaker @nogc clearly. Conclusion was that we
should return to this topic after Don's DConf talk ;)