Escape analysis

Walter Bright newshound1 at digitalmars.com
Tue Oct 28 19:37:00 PDT 2008


Sean Kelly wrote:
> I think the cost/benefit of this could probably be argued either way. 
> I've never encountered a bug related to this, for example, so to me the 
> benefit is entirely theoretical while the cost is immediate.

I have. Not often in my own code because I am very careful to avoid it, 
but it frequently happens in 'bug' reports I get sent. This trap does 
happen to programmers who are less familiar with how the underlying 
stack machine actually works.

The real problem is there is no way to verify that this isn't happening 
in some arbitrarily large code base. I strongly believe that it is good 
for D and for programming languages in general to work towards a design 
that can provably eliminate certain types of bugs.



More information about the Digitalmars-d mailing list