Well, well...

Sean Kelly sean at f4.ca
Thu Aug 2 22:57:16 PDT 2007


Mike Capp wrote:
> Sean Kelly Wrote:
> 
>> As an aside, one interesting aspect of Erlang is that it turns code 
>> reliability on its head to a degree by simply aborting the process if an 
>> exception occurs.  This seems far preferable to the manual exception 
>> recovery typically done in C++, Java, and D, which reduces code clarity 
>> and can be difficult to get right. 
> 
> Cough, splutter. 
> 
> That's fine, as long as you place zero value on whatever unsaved work the user had done, and you're confident that your users will share your Zen-like equanimity. What's true in telecoms isn't necessarily true everywhere.

True.  But I think graceful recovery could be done as well.  That silly 
video Dave Abrahams linked showed errors being trapped and processes 
restarted, so I imagine a similar mechanism could rollback DB 
operations, etc, as necessary.

> From other angles, though, the "just crash" approach has some intriguing possibilities. If it's your default means of exiting, chances are your app will be pretty robust when faced with unexpected failures. There was some interesting academic work about a year ago on "crash-only programming"; see e.g. http://lwn.net/Articles/191059/

It's pretty popular in high availability systems, though this is the 
first I've thought of using it for portions of a user-level program.


Sean



More information about the Digitalmars-d mailing list