caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Bruce Hoult <bruce@hoult.org>
To: Chris Hecker <checker@d6.com>,
	Francois.Pottier@inria.fr, caml-list@inria.fr
Subject: Re: [Caml-list] Function call with a list of parameters
Date: Thu, 13 Dec 2001 12:49:11 +1300	[thread overview]
Message-ID: <a05101027b83d9b5404e7@[192.168.0.2]> (raw)
In-Reply-To: <4.3.2.7.2.20011212103956.00e4ced0@arda.pair.com>

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


  parent reply	other threads:[~2001-12-12 23:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-11 16:31 Vincent Barichard <Vincent Barichard
2001-12-11 22:59 ` Chris Hecker
2001-12-11 23:26   ` Bruce Hoult
2001-12-12  9:35   ` Markus Mottl
2001-12-12 10:20   ` Vincent Barichard <Vincent Barichard
2001-12-12 22:31     ` Diego Olivier Fernandez Pons
2001-12-13  0:20       ` Bruno Pagano
2001-12-13  0:17         ` Diego Olivier Fernandez Pons
2001-12-14 13:26           ` Alain Frisch
2001-12-17  7:40             ` Francois Pottier
2001-12-12 13:52   ` Francois Pottier
2001-12-12 18:54     ` Chris Hecker
2001-12-12 19:04       ` Patrick M Doane
2001-12-12 23:49       ` Bruce Hoult [this message]
2001-12-13  7:41       ` Francois Pottier
2001-12-12  9:31 ` Jim Farrand

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='a05101027b83d9b5404e7@[192.168.0.2]' \
    --to=bruce@hoult.org \
    --cc=Francois.Pottier@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=checker@d6.com \
    /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).