Am 06.02.2014 21:29, schrieb Adam D. Ruppe:
On Thursday, 6 February 2014 at 19:24:19 UTC, Elie Morisse wrote:
How about letting the compiler decide what's best in the default case?

The problem there is the compiler would have to look at the big picture
to make an informed decision, and big picture decisions are generally
hard to implement.

Determining whether it is GC or not automatically would require analysis
of the function body, tracing where each reference ends up, and looking
at other functions it gets passed to (which might not be possible if you
have only the prototype without a body). Things like pure can help with
it, but generally, I don't think the compiler can make a smart decision.

Java and Go compilers do it, why not D ones?

--
Paulo

Reply via email to