Browse thread
Preventing values from escaping a context
[
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: | 2010-02-09 (08:43) |
From: | Jacques Garrigue <garrigue@m...> |
Subject: | Re: [Caml-list] Preventing values from escaping a context |
From: Miles Sabin <miles@milessabin.com> >> The short answer is no. >> Types are not sufficient to prevent values from escaping. > > I appreciate that mention of Scala is borderline off-topic on this > list, however that's a very broad negative statement, so broad > counterexamples seem appropriate ... ;-) > > Philippe Haller of EPFL is working on a uniqueness types extension of > Scala which provides exactly this, packaged as a compiler plugin for > scalac (my hope is that it will be rolled into the main scala > distribution during the 2.8.x series, so this isn't solely academic > exercise). Indeed my statement was too general. Uniqueness type can do the trick... because they are explicitly designed for that. I answered this way because, in Haskell, since there are no hidden references, types are enough to disallow escaping. Unfortunately this does not work in ocaml. So ocaml also could profit from uniqueness types. Cheers, Jacques Garrigue