Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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.

/Andreas