Version française
Home     About     Download     Resources     Contact us    
Browse thread
Today's inflamatory opinion: exceptions are bad
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jean-Christophe Filliatre <filliatr@l...>
Subject: Re: [Caml-list] Today's inflamatory opinion: exceptions are bad

Andreas Rossberg writes:
 > 
 > I guess Joe Armstrong (of Erlang fame) would have to say a lot about how to 
 > deal with failure properly. According to him, and the seemingly successful 
 > Erlang philosophy (which is, "let it crash"), attempts to locally handle 
 > errors are exactly the wrong approach. See his very insightful thesis.

This is close to one of the rules related to errors in 
Kernighan & Pike's excellent book "The practice of programming"
(http://cm.bell-labs.com/cm/cs/tpop/), which is

  # Detect errors at a low level, handle them at a high level.

I always try to follow this rule and it appears to be a very good one.
And regarding exceptions specifically, another of their rules is
this one:

  # Use exceptions only for exceptional situations. 

-- 
Jean-Christophe