English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Preventing values from escaping a context
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-02-11 (11:05)
From: rossberg@m...
Subject: Re: [Caml-list] Preventing values from escaping a context
"Alexey Rodriguez" <mrchebas@gmail.com> wrote:
> On whether monads can solve the problem in this thread, yes they can.

Not in OCaml. In the presence of unrestricted side effects, the ST monad
trick is no longer sufficient because a resource can leak through a
reference or an exception without that showing up in the type.

> But for this you need support from the type system (rank-2 universal
> quantification).

FWIW, OCaml can express that, but it doesn't help the problem.