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

Re: define and set! with multiple-values



    As a programmer I like and enjoy multiple return values, it would be
    sad to see them go.

I think that makes you nearly unique.  The vast majority of Common Lisp
programmers I've talked to consider multiple values to be an ugly blot on
the language (one of many), but a perhaps-necessary evil.
Multiple values do make life *much* harder for implementors.

    It would be interesting research to find out what the complexity/pain
    for programmer and implementer of stricter rules placing stricter
    rules on return value count.
    
I wasn't suggesting "stricter rules on return value count".  I was
suggesting the very strict rule that *every* function should return exactly
one value, and if you want to pass back a bunch of things you do it in a
sequence or as a side effect or something like that.  Then count on the
"sufficiently smart compiler" to avoid having to actually heap-allocate the
return sequence.  But I don't have a specific proposal to make right now.

There are definitely cases where you want to return multiple values without
consing, and we must provide for these cases, but it seems a shame to
complicate normal function calls and returns in order to allow for these
relatively rare cases.

-- Scott

===========================================================================
Scott E. Fahlman			Internet:  sef+@cs.cmu.edu
Senior Research Scientist		Phone:     412 268-2575
School of Computer Science              Fax:       412 681-5739
Carnegie Mellon University		Latitude:  40:26:33 N
5000 Forbes Avenue			Longitude: 79:56:48 W
Pittsburgh, PA 15213
===========================================================================