On Tuesday, 8 October 2013 at 17:00:35 UTC, Dicebot wrote:
On Tuesday, 8 October 2013 at 16:29:38 UTC, ponce wrote:
Hidden language allocations:
- concatenation operator ~
- homogeneous arguments void (T[]... args)
- "real" closures that escapes
- array literals
- some phobos calls
What else am I missing?
I don't see the big problem, and a small fraction of projects
will require a complete ban on GC allocation, right?
Should be all I am aware of (though closures sometimes do
allocate even without escaping AFAIK). This is more than enough.
Imagine stuff like vibe.d - for proper performance you don't
want to make any allocations during request handling. Neither
GC, nor malloc. It is still perfectly fine to run GC in
background (well, assuming we will get concurrent GC one day)
for some persistent tasks but how are you going to verify your
request handling is clean? By tracking mentioning of array
literals in random places by hand? During every single pull
review?
I have said on this topic several times - it does not matter
what is _possible_ to do with D memory model. It does matter
what is _convenient_ to do. If something is possible but needs
more attention than in C++ it will be considered by crowd as
impossible and no blog posts will change that.
(loud shouting "@noheap, @noheap, @noheap !")
+1