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 AAA20538; Thu, 13 Dec 2001 00:50:21 +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 AAA20445 for ; Thu, 13 Dec 2001 00:50:20 +0100 (MET) Received: from www.image-acquire.com (valkyrie.image-acquire.com [207.71.8.230]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id fBCNoIH01902; Thu, 13 Dec 2001 00:50:18 +0100 (MET) Received: from [192.168.0.2] (203-79-84-117.adsl.paradise.net.nz [203.79.84.117]) by www.image-acquire.com (8.9.3/8.9.3) with ESMTP id RAA01592; Wed, 12 Dec 2001 17:50:14 -0600 Mime-Version: 1.0 X-Sender: bruce@www.hoult.org Message-Id: In-Reply-To: <4.3.2.7.2.20011212103956.00e4ced0@arda.pair.com> References: <4.3.2.7.2.20011211145019.028d8e50@arda.pair.com> <15382.13531.184819.989958@helios.info-ua> <4.3.2.7.2.20011211145019.028d8e50@arda.pair.com> <4.3.2.7.2.20011212103956.00e4ced0@arda.pair.com> Date: Thu, 13 Dec 2001 12:49:11 +1300 To: Chris Hecker , Francois.Pottier@inria.fr, caml-list@inria.fr From: Bruce Hoult Subject: Re: [Caml-list] Function call with a list of parameters Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk At 10:54 AM -0800 12/12/01, Chris Hecker wrote: >It does seem like there's an asymmetry in parameters versus return >values that might be worth looking into (in languages in general, >not just caml). Bruce's example was interesting to me because I >didn't know that lisp had tuples (as opposed to just lists). That >reintroduces the asymmetry that I'm talking about, where if >everything was just a list (both returns and params) then it would >be symmetric and apply would just work. Even with tuples, lisp is >still more symmetric since you can convert a tuple to a list >generically and then pass it in with apply (according to Bruce's >example). > >I would assume people way more knowledgable than me have analyzed >the tradeoffs in the [a]symmetry before. Assuming it's interesting >at all, which I don't know enough about languages to know that >either. :) This asymmetry was one of the motivating insights behind the design of Scheme in the late 1970's, and both Dylan and Common Lisp have to some extent followed it. If you write programs in Continuation Passing Style (CPS) then there is no asymmetry between parameter passing and return value passing, and many Scheme (and *ML) compilers convert programs to CPS in the process of compilation. Scheme provides constructs to allow the user to write a mix of CPS and normal code (call/cc) while CL and Dylan provide more explicit support for multiple return values. Scheme recently added similar support. -- Bruce ------------------- 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