Arthur Smyles wrote:
My use case for using 'values' is to pass a primary value and secondary values to a caller. If the caller can only use one value then I want it to use the primary value and discard the secondary values. So what I would like to see is:
(if (values #f #f) #t #f) => #f
since the primary value is false and the 'if' function can only use the primary value.
As it stands now, as a caller of an api that uses 'values', I'd have to deal with it as a specialized data structure, in which case, the utility of it is very limited since I could just as well pass a vector or some other structure.
I think the above semantics could be implemented and still be R5 compliant.
I've once written a response to someone posting this as bug in bugzilla:
http://www.iro.umontreal.ca/~gambit/bugzilla/show_bug.cgi?id=63
I.e. I personally still think the "take first value if continuation only expects one value" approach is a bad idea.
If you're really wanting to see that behaviour, maybe you could describe the reasons in more detail and think about the issues I've lined out above; maybe there is a way to achieve both.
Christian.