Browse thread
[Caml-list] Exceptions considered harmful
-
skaller
-
Lauri Alanko
- Christophe TROESTLER
- Michael Hicks
- Richard Cole
-
Lauri Alanko
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Christophe TROESTLER <debian00@t...> |
| Subject: | Re: [Caml-list] Exceptions considered harmful |
On Sun, 4 Jul 2004, Lauri Alanko <la@iki.fi> wrote: > > an exception syntax that is closer to Haskell's monadic style: an > expression either returns a value or raises an exception, so > catching an exception is like pattern matching: there's one case for > the returned value, others for possible exceptions: > > try > x <- foo () > in > bar () > unless > E1 -> handle1 () > E2 -> handle2 () How is this sensibly different from OCaml' syntax? try x <- foo(); bar() with | E1 -> handle1() | E2 -> handle2() ChriS ------------------- 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