On Wed, 2013-02-20 at 09:27 -0800, Steve Haflich wrote:
. . .
> Perhaps you have just misstated the semantics. It is true that the
> called function always returns the zero-or-more values returned by the
> last executed form, but there is no "responsibility" on the calling
> function. If it does nothing special, it receives just the principal
> value (if any). If the called function returns fewer values than the
> caller expects, the missing values are nil. If too many, the extra
> values are quietly discarded.
>
>
> There is more variance allowed if the called function is declared.
> The compiler might optimize some mv away in any particular call,
> provided precise semantics are preserved. And if the declaration is
> not obeyed by the called function, the ANS permits earthquakes,
> volcanoes, cats living with dogs, ...
I think we're on the same page here. I meant "responsibility" only in
the sense that a caller could only get more than the "principal" value
of a function if it explicitly used one of the multiple-value operators.
That wouldn't change if the called function were declared to return
multiple values, would it?
I'm fairly liberal, so cats living with dogs doesn't bother me much.
Cats producing dogs is another matter :-)
--
Bill Wood