Browse thread
[OSR] OCaml Standard Recommandation Process
[
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: | Arnaud Spiwack <Arnaud.Spiwack@l...> |
| Subject: | Re: [Caml-list] [OSR] OCaml Standard Recommandation Process |
> > Monads strike me as being a better way to do this, but again, we're > talking about deep changes to Ocaml. Monads are no more than a pair of functions (there are four in Haskell presentation of these, but two of them can be defined automatically). They not only exist by essence, but there also is a camlp4 extension (rather short actually) which gives them a nice notation looking : perform p <-- e; q <-- f; return a You can specify a module name after the "perform" keyword when using several monads. This camlp4 extension is pa_monad (authored by Oleg Kiselyov, Lydia E. van Dijk, and Jacques Carette), it works both with camlp4 3.10 and previous version by the way (plus camlp5 I guess). Actually, there are a couple of developpement that use monads : Jérôme Vouillon's Lwt (lightweight, monadic, cooperative threads) are a monad. On a more personnal note, my current developpement (somewhere deep inside the code of the proof assistant Coq) uses a monad as well. The downside is that sometimes monad might be slower than other approaches (there are more closure built than necessary). At least in the current runtime and compiler. But I guess we're going (again) off topic... We probably have to start having wiki discussions ;) . Arnaud Spiwack