Re: Heap fucntion calls

2011-09-22 Thread Simen Kjaeraas
On Thu, 22 Sep 2011 00:43:09 +0200, deadalnix deadal...@gmail.com wrote: Great answer ! Thank you very much, it answered almost everything ! But what about, in the exemple you gave me (which is great by the way) if foo as parameters ? Those parameters are passed on the stack by copy to the

Heap fucntion calls

2011-09-21 Thread deadalnix
D has a wonderfull feature named delegate. Delegate can acess local data, thus would be dangerous if thoses data were on the stack. For what I understand, when a delegate can access the local data of a function, those data are set on the heap instead of the stack, resulting on a slower

Re: Heap fucntion calls

2011-09-21 Thread Simen Kjaeraas
On Wed, 21 Sep 2011 18:32:49 +0200, deadalnix deadal...@gmail.com wrote: D has a wonderfull feature named delegate. Delegate can acess local data, thus would be dangerous if thoses data were on the stack. For what I understand, when a delegate can access the local data of a function, those

Re: Heap fucntion calls

2011-09-21 Thread deadalnix
Great answer ! Thank you very much, it answered almost everything ! But what about, in the exemple you gave me (which is great by the way) if foo as parameters ? Those parameters are passed on the stack by copy to the function, and then, copied to the heap (resulting in two copies) ? Le