[Grace-core] FYI: Notes on Multiple Returns

Andrew P Black black at cs.pdx.edu
Wed Aug 19 16:21:04 PDT 2015


On 17 Aug 2015, at 17:19 , Marco Servetto <marco.servetto at gmail.com> wrote:

> Well... "Grace nor most popular languages allow this"
> 
> python does allow easy tuple stuff.
> 
> a,b=myfun()
> 

Yes, and we are talking about allowing Tuples in Grace too.  But that is a different topic.

The statement that I made is, I believe, true.   Emerald is the only language that I can think of that allowed multiple returns.  An operation that returned a single value could be used as an expression, but those that returned no values, or two or more values, could only be used in an assignment like 

	 a, b ← myfun(x,y)

What other languages do you know of that allow multiple returns?


	Andrew

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20150819/f693c0ef/attachment.html>


More information about the Grace-core mailing list