From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id BAA10043; Sun, 18 Nov 2001 01:01:18 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA10048 for ; Sun, 18 Nov 2001 01:01:18 +0100 (MET) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id fAI01Hv11730 for ; Sun, 18 Nov 2001 01:01:17 +0100 (MET) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id BAA21583 for caml-list@inria.fr; Sun, 18 Nov 2001 01:01:17 +0100 Date: Sun, 18 Nov 2001 01:01:17 +0100 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] queasiness about Exit Message-ID: <20011118010117.A21540@verdot.inria.fr> References: <20011115093845.A26661@rootless> <20011116140514.A472@la.iki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011116140514.A472@la.iki.fi>; from la@iki.fi on Fri, Nov 16, 2001 at 02:05:15PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Fri, Nov 16, 2001 at 02:05:15PM +0200, Lauri Alanko wrote: > This seems like something where first-class continuations would be > useful. Are there any plans on adding them to O'Caml? SML/NJ at least > seems to have them. This is feasible, I implemented them in Caml Light some years ago. But in the implementaion of SML/NJ, continuations are "light" and natural because their execution "stack" is implemented not by a stack but by a list. To get the continuation, you has just to get the "stack pointer". In OCaml, you should make a copy of the execution stack. > If full continuations are too expensive, even upwards-only continuations > would be a handy alternative to exceptions. Why not using exceptions, then? Do you mean that you want to be able to restart the same continuation several times? -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr