Browse thread
Resumable exceptions in plain OCaml
-
oleg@p...
- Erik de Castro Lopo
-
Christophe Raffalli
- Christophe Raffalli
- oleg@p...
- Dmitry Bely
[
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 Raffalli <raffalli@u...> |
| Subject: | Re: [Caml-list] Resumable exceptions in plain OCaml |
Christophe Raffalli a écrit : > > Hi, > > may be a little camlp4 would lead to a more natural and readable > syntax. The idea is nice but the > > rraise (Foo i) (fun e -> try raise e with Foo_r1 x -> ...) looks > confusing > yet another remark rraise (Foo i) (function Foo_r1 x -> ... | e -> raise e) seems shorter, equivalent and more efficient. Am I wrong ? remark: it seems one very rarely use exceptions as values passed to function and matched with normal match ... but this is completely legal in OCaml ! In fact exceptions in OCaml are one big polymorphic variant type that existed before polymorphic variant where introduced ;-) Christophe Raffalli