caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] queasiness about Exit
Date: Sun, 18 Nov 2001 01:01:17 +0100	[thread overview]
Message-ID: <20011118010117.A21540@verdot.inria.fr> (raw)
In-Reply-To: <20011116140514.A472@la.iki.fi>; from la@iki.fi on Fri, Nov 16, 2001 at 02:05:15PM +0200

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


  reply	other threads:[~2001-11-18  0:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-15 15:38 William Harold Newman
2001-11-15 16:58 ` Andreas Rossberg
2001-11-15 20:41 ` John Prevost
     [not found] ` <9t0skf$d27$1@qrnik.zagroda>
2001-11-15 21:43   ` Marcin 'Qrczak' Kowalczyk
2001-11-16  8:30 ` Francois Pottier
2001-11-16 12:05 ` Lauri Alanko
2001-11-18  0:01   ` Daniel de Rauglaudre [this message]
2001-11-15 17:33 Krishnaswami, Neel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011118010117.A21540@verdot.inria.fr \
    --to=daniel.de_rauglaudre@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).