|Multiple return values Arthur.Chance@Smallworld.co.uk (1997-04-16)|
|Re: Multiple return values WStreett@shell.monmouth.com.spamguard (1997-04-18)|
|Re: Multiple return values email@example.com (1997-04-18)|
|Re: Multiple return values firstname.lastname@example.org (1997-04-18)|
|Re: Multiple return values email@example.com (1997-04-18)|
|Re: Multiple return values firstname.lastname@example.org.OZ.AU (1997-04-18)|
|Re: Multiple return values (Mars Saxman) marssaxman%sprynet.com.antispam@nac (marssaxman) (1997-04-18)|
|Re: Multiple return values email@example.com (1997-04-18)|
|Re: Multiple return values jbuck@Synopsys.COM (1997-04-18)|
|Re: Multiple return values firstname.lastname@example.org (1997-04-20)|
|Re: Multiple return values danwang@dynamic.CS.Princeton.EDU (1997-04-20)|
|[25 later articles]|
|From:||email@example.com (Henry Baker)|
|Date:||18 Apr 1997 00:45:44 -0400|
Arthur.Chance@Smallworld.co.uk (Arthur Chance) wrote:
> A thought struck me over the weekend while rereading the "Lambda: the
> Ultimate <foo>" papers:
> Most programming languages allow procedures with multiple arguments
> (in some cases allowing them to be used in curried form as well), but
> very few languages allow multiple return values, in spite of the fact
> that multiple results *are* multiple arguments when you're wearing
> CPS-tinted glasses. Why is this?
Clumsy syntax, mostly, and almost total ignorance of CPS by non-Lisp
Carl Hewitt was probably the biggest promotor of CPS back in the early
1970's, and the Scheme people (Sussman, Steele) took up the cry.
There is (at least) one issue of Lisp & Symbolic Computation devoted
to CPS and its history.
The stack-based languages (Forth, Postscript) have always had symmetry
in multiple arguments and multiple returned values. These languages
typically have 2 (or more) stacks, so that the return points don't
have to be synchronized to the arguments and returned values. This
provides for a relatively cheap solution for 'tail calling' (lambda
calculus axiom eta).
Some languages provide for multiple arguments by currying, while
others provide for multiple arguments by virtually consing them into a
list or a vector (or both!). Most languages allow multiple returned
values in the form of a consed up list or vector, but the efficient
implementation of this can require a _huge_ amount of sophistication
and is therefore not usually done.
Return to the
Search the comp.compilers archives again.