Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Exceptions considered harmful
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Exceptions considered harmful
On Mon, 2004-07-05 at 06:24, Michael Hicks wrote:
> > try
> >   x <- foo ()
> > in
> >   bar ()
> > unless
> >   E1 -> handle1 ()
> >   E2 -> handle2 ()
> 
> The key part to this approach is that bar() is not covered by the 
> exception handler. 

Yeah, this is just an extension of let/in:

let x = foo () in bar () unless ...

however it is still dynamic = statically insecure =
unable to reason about the code locally = bad,
however increased localisation is obtained:
you have more idea where the exception came from
so this does seem better.

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net



-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners