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

Re: Multiple values



If multiple values are to be defined for Scheme, I personally
would prefer that

(a) They be assigned inessential status, and
(b) Some comment be made in the R?RS admonishing implementors to
    attempt to make lists be of roughly equivalent efficiency, or
    suggesting some stylistic conventions for MV use.

The latter suggestion is motivated by frequent observation of
what seem to me to be excessive or abusive instances of MV use in 
practical code written in other LISPs.   

Returning both the number-theoretic quotient and the remainder 
from a division routine seems like a use of MV's about which
few people would complain; but using MV's instead of creating
and passing composite data structures for related values that are
meant to be treated as an abstract object seems an unnecessary and
obfuscatory use of MV's.  Often it seems people use MV's in such
cases either out of lack of aesthetic sense or because consing up
a data structure is too costly.  An admonition to programmers could
address the former problem; and admonition to implementors, the latter.

					asc