Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: newbie ocaml and delimited continuations
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: oleg@o...
Subject: Re: newbie ocaml and delimited continuations

Sorry for the late reply: I was out of town. 

> Is it likely that this package may be incorporated into a later official
> relase of ocaml (ie receive first class support ) ?. continuations would
> appear to offer considerable programming expressiveness even if not widely
> supported in other languages (cf scheme).

The library delimcc is a pure library in the sense it does not patch
OCaml in any way. Therefore, it does not have to be incorporated into
the official release of OCaml. There are many very useful OCaml
libraries (Core or Extlib to name a few) that will never be part of
the official release. Since Inria does not have many resources to
devote to OCaml, they rather concentrate on the compiler and the basic
run-time system, and leave the libraries to the
community. Incidentally, GHC Haskell system is being developed in a
similar fashion.

> And a very basic tech question - It is obviously necessary that the package
> runs as interpreted bytecode - so that the activation record of the
> function/closure may be saved/serialized off.

Although the current delimcc library does support bytecode only, that
is not the fundamental limitation. It is possible in principle to
capture and resume continuations in ocamlopt-compiled programs. That
is, however, quite more involved, requires the use of frame tables,
etc. There has not been much interest in ocamlopt-delimited
continuations to justify the development. 

	Incidentally, a new version of the library
	http://okmij.org/ftp/packages/caml-shift.tar.gz
just has been released, with many optimizations reducing the size of
captured continuations. The original library was not optimized at all.