On Mar 6, 2012, at 6:29 PM, Walter Bright <newshou...@digitalmars.com> wrote:
> On 3/6/2012 5:29 PM, Chad J wrote: >> But what do you say to the notion of isolation? someFunc is isolated from >> riskyShenanigans becuase it /knows/ what state is touched by >> riskyShenanigans. >> If riskyShenanigans does something strange and unexpected, and yes, it does >> have >> a bug in it, then I feel that someFunc should be able to reset the state >> touched >> by riskyShenanigans and continue. > > > That's the theory. But in practice, when you get a seg fault, there's (at > minimum) a logical error in your program, and it is in an undefined state. > Since memory is all shared, you have no idea whether that error is isolated > or not, and you *cannot* know, because there's a logic error you didn't know > about. Minor point, but some apps are designed such that segfaults are intended. I worked on a DB that dynamically mapped memory in the segfault handler and then resumed execution. Since D is a systems languages, very few assumptions can be made about error conditions.