Escape analysis

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Oct 28 19:37:48 PDT 2008


Jason House wrote:
> Sean Kelly Wrote:
> 
>> Walter Bright wrote:
>>> In other words (as Andrei pointed out to me) the cost of those
>>> errors, even though rare, is very high. This makes it highly
>>> desirable to prevent them automatically, rather than relying on
>>> the skill and attention to detail of the programmer.
>> 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.
> 
> As the author of an open source multithreaded application in D1, I've
> had these errors pop up.  It's easy to overlook this stuff and pass
> things the wrong way (it's easier to code).  Tango doesn't even have
> a bind library to make it easier!

I agree. Particularly in higher-order code this kind of problem is bound 
to show itself. And it's a really really nasty case of reality ripping 
straight through a carefully-conceived abstraction - something like a 
bullet carving through a precision microprocessor.

Andrei



More information about the Digitalmars-d mailing list