caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Andreas Rossberg <rossberg@ps.uni-sb.de>
To: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] About Obj (was Recursive lists)
Date: Thu, 14 Oct 2004 11:52:05 +0200	[thread overview]
Message-ID: <416E4C45.1090804@ps.uni-sb.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0410131410340.20927@shell2.speakeasy.net>

brogoff wrote:
> 
> I remembered shortly after I asked that Alice ML also provides a way to handle
> these tail recursive (modulo cons) functions by providing a library for
> Prologish logical variables called "promises" in that dialect. Neat idea, and
> useful for more than tail recursive lists, but I wonder how efficient the
> implementations are.

Promises surely would be overkill for just tail recursion. And I'm 
afraid that the general overhead their presence introduces may well be 
larger than the bit of efficiency you can squeeze out by making List.map 
tail recursive. (It is similar to laziness, and Alice uses reflective 
just-in-time compilation to avoid redundant tests for promised values.)

Promises, and more generally futures, have been introduced for 
light-weight concurrent programming with implicit dataflow 
synchronisation. They enable coding all kinds of concurrency 
abstractions. You can also use promises to e.g. construct data 
structures top-down (of which tail recursive map or append functions are 
simple instances), but that rather is a neat side effect and not their 
primary motivation.

	- Andreas

-- 
Andreas Rossberg, rossberg@ps.uni-sb.de

Let's get rid of those possible thingies!  -- TB

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-10-14  9:52 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-08 13:20 [Caml-list] Recursive lists Luca Pascali
2004-10-08 13:31 ` Keith Wansbrough
2004-10-08 14:32   ` skaller
2004-10-08 14:42   ` Alex Baretta
2004-10-08 15:43     ` David Brown
2004-10-08 17:19       ` Alex Baretta
2004-10-08 23:29         ` skaller
2004-10-09  8:35           ` Keith Wansbrough
2004-10-09  9:07             ` skaller
2004-10-09  8:32         ` Keith Wansbrough
2004-10-08 17:18     ` Wolfgang Lux
2004-10-11  0:44   ` Brian Hurt
2004-10-11  6:32     ` William Lovas
2004-10-11  6:52       ` Ville-Pertti Keinonen
2004-10-13 11:29         ` Alex Baretta
2004-10-13 11:22       ` Alex Baretta
2004-10-11  9:04     ` Keith Wansbrough
2004-10-08 14:05 ` Sébastien Furic
2004-10-08 14:44   ` Alex Baretta
2004-10-08 15:09     ` Jon Harrop
2004-10-08 15:13   ` james woodyatt
2004-10-08 14:26 ` sejourne_kevin
2004-10-08 18:28   ` Alex Baretta
2004-10-11  8:01     ` Jean-Christophe Filliatre
2004-10-11  9:20       ` Diego Olivier Fernandez Pons
2004-10-11 13:38       ` [Caml-list] About Obj (was Recursive lists) Christophe Raffalli
2004-10-11 13:49         ` [Caml-list] " Christophe Raffalli
2004-10-11 15:33         ` [Caml-list] " Jon Harrop
2004-10-11 16:09           ` Richard Jones
2004-10-11 16:40           ` [Caml-list] About Obj Yamagata Yoriyuki
2004-10-13 11:59             ` Alex Baretta
2004-10-11 16:24         ` [Caml-list] About Obj (was Recursive lists) james woodyatt
2004-10-11 16:46           ` brogoff
2004-10-11 17:24             ` james woodyatt
2004-10-12  0:19               ` skaller
2004-10-20 22:10             ` Greg K
2004-10-12 15:19           ` Christophe Raffalli
2004-10-13 11:42           ` Alex Baretta
2004-10-13 21:19             ` brogoff
2004-10-14  9:52               ` Andreas Rossberg [this message]
2004-10-14 17:38                 ` brogoff
2004-10-15  8:22               ` Alex Baretta
2004-10-15 17:02                 ` brogoff
2004-10-17 13:42                   ` Alex Baretta
2004-10-12  6:17       ` [Caml-list] Recursive lists sejourne_kevin

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=416E4C45.1090804@ps.uni-sb.de \
    --to=rossberg@ps.uni-sb.de \
    --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).