Re: Multiple return values

icedancer@ibm.net (Ken Walter)
18 Apr 1997 00:44:28 -0400

          From comp.compilers

Related articles
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 smryan@mail.com (1997-04-18)
Re: Multiple return values icedancer@ibm.net (1997-04-18)
Re: Multiple return values hbaker@netcom.com (1997-04-18)
Re: Multiple return values fjh@mundook.cs.mu.OZ.AU (1997-04-18)
Re: Multiple return values (Mars Saxman) marssaxman%sprynet.com.antispam@nac (marssaxman) (1997-04-18)
Re: Multiple return values preston@tera.com (1997-04-18)
Re: Multiple return values jbuck@Synopsys.COM (1997-04-18)
Re: Multiple return values smryan@mail.com (1997-04-20)
[26 later articles]
| List of all articles for this month |

From: icedancer@ibm.net (Ken Walter)
Newsgroups: comp.compilers,comp.lang.misc
Date: 18 Apr 1997 00:44:28 -0400
Organization: Solution Technology
References: 97-04-091
Keywords: design

Arthur.Chance@Smallworld.co.uk (Arthur Chance) writes:
:>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?


Returning a collection of anonymous results is more complicated than
loading one result into the registers for return. If the caller isn't
interested in the return values how are they discarded, etc.? If
structures are allowed to be returned, then the multiple values can be
returned as one object; this takes care of most cases.


Although I rather like Xerox's Mesa language which did allow multiple returns.


Ken Walter
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.