[Prev][Next][Index][Thread]

Re: small Q



In article <398F2D0B.EB3781D5@lotus.com>, Brian_Campbell@lotus.com 
says...
> Since I'm comming from a long history of one return value programming
> languages (Scheme R4RS, SmallTalk, C, Java, PASCAL, etc.), could someone
> describe where multiple return values would be useful and not just a
> convenience?

I used to teach Pascal to students with no computing experience, and one 
of the worst things to try to get across was the difference between VAR 
parameters and ordinary ones. When I came to design a language myself I 
made sure there was nothing resembling a VAR parameter in sight, by the 
simple expedient of having multiple return values. You could do things 
like

let a, b, c, d = f(x, g(y)), z

where f took and returned three values, and g returned two. The language 
(a 4GL) is still in use: <http://www.aran.co.uk/seachange4/> is a 
hopeless commercial web site that doesn't actually tell you about it.

Peter.


-- 
peter@harle      Harlequin Ltd, Barrington Hall,
quin.co.uk       Barrington, Cambs CB2 5RG, England.



References: