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 TAA27461; Thu, 14 Oct 2004 19:38:19 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA27450 for ; Thu, 14 Oct 2004 19:38:18 +0200 (MET DST) Received: from mail2.speakeasy.net (mail2.speakeasy.net [216.254.0.202]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i9EHcGjn018402 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 14 Oct 2004 19:38:18 +0200 Received: (qmail 23968 invoked from network); 14 Oct 2004 17:38:15 -0000 Received: from shell2.speakeasy.net ([69.17.110.71]) (envelope-sender ) by mail2.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 14 Oct 2004 17:38:15 -0000 Date: Thu, 14 Oct 2004 10:38:15 -0700 (PDT) From: brogoff To: Caml List Subject: Re: [Caml-list] About Obj (was Recursive lists) In-Reply-To: <416E4C45.1090804@ps.uni-sb.de> Message-ID: References: <41669437.3010201@yahoo.it> <4166A395.70301@yahoo.fr> <4166DC42.3090602@baretta.com> <16746.15832.409677.764564@gargle.gargle.HOWL> <416A8CDA.7060407@univ-savoie.fr> <00F89380-1BA2-11D9-B4CE-000A958FF2FE@wetware.com> <416D14C3.4030902@baretta.com> <416E4C45.1090804@ps.uni-sb.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at nez-perce with ID 416EB988.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; brogoff:01 brogoff:01 caml-list:01 rossberg:01 dialect:01 overkill:01 recursion:01 light-weight:01 abstractions:01 equivalents:01 workarounds:01 slower:01 ocaml:01 speakeasy:01 logical:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 14 Oct 2004, Andreas Rossberg wrote: > 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. Thanks, I suspected as much, but wasn't sure. Alice looks like an interesting language, but I suspect (given it's Mozart/Oz heritage) that the implementation would appeal to me less than OCaml on performance and convenience issues. I'd like to be able to write those list functions in the core language and have performance equivalent to the Obj using versions or their equivalents. Nope, not a huge annoyance given the workarounds (Obj, or a slower implementation which has to reverse) but a "nice to have". String and array size restrictions are more annoying. -- Brian ------------------- 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