[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] multiple values module
Eli Barzilay scripsit:
> You can't avoid the extra cost. Implementations vary with heap or
> stack allocation which is something that goes in a different level.
You can't reduce the cost to zero, primarily because there is no way to
statically determine how many values a procedure returns, but you can
reduce it.
> In any case, your original statement of multiple values as some
> lightweight alternative is even more wrong given this. (The
> historical context is first class continuations.)
I don't see how that can be. Multiple values first appeared (AFAIK) in
Zetalisp, which did not have first-class continuations. Quoth the 3rd
(1981) edition of the Chine Nual:
When a function needs to return more than one result to its caller,
multiple values are a cleaner way of doing this than returning
a list of the values or setq-ing special variables to the extra
values.
I don't know when multiple values were first provided in a Scheme
implementation, but they do not appear in R4RS, and the Ashley & Dybvig
paper speaks in 1994 of "the new Scheme multiple values interface".
If they existed at the time of RRRS (1985) but were not standardized,
they would still postdate the Zetalisp implementation by some years.
--
Overhead, without any fuss, the stars were going out.
--Arthur C. Clarke, "The Nine Billion Names of God"
John Cowan <cowan@x>
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports