[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
call-with-multiple-values
Playing a little with call-with-values this week-end, I wonder why this
precise order of arguments:
(call-with-values values-producer function)
It seems to me that it would be simpler (from a mental point of
view) to adopt a signature closer to `apply' which in turn would
allow to go from a binary to a n-ary call-with-values. Something like:
(call-with-values function arg1 ... argN other-args-producer)
begin{digression}
This also reminded me of proposals made at ISO to unify multiple
values with &rest variables. As far as I recall this was an idea first
mentionned by Herbert Stoyan in a EuLisp meeting some 5 years ago, and
reworked for ISO by Jerome Chailloux, Greg Nuyens, Julian Padget and
myself. Instead of having a thunk for other-values-producer, it might be
possible to have a "dotted variable" as for example in
(define (foo key . others)
(call-with-value + others) )
but that's another story for r>5rs.
end{digression}
Christian.