On Tue, Dec 06, 2011 at 11:08:08PM +0100, David Kastrup wrote: > > Have you considered using `(values)' as your way of saying, "I'm not > > returning any values"? > > Testing for that is not all that much fun. It is also rather useless > since pretty much all of the call-for-effect functions of Guile return > *unspecified* rather than (values).
You're not really supposed to test for it. In fact, if you don't try to use the value of when, unless, or one-armed ifs, you'll do just fine in general. > It is not clear to me why (values) can't just evaluate to a single > *unspecified* just like '() evaluates to null. Outside of > call-with-values, I don't see much need to treat it special. Implementing that would pretty much either require CPS transforms all around (then you'd look at the arity of the continuation), or else you'd have to be keeping track of the arity of the current continuation some other way. Is it just me, or does that smell like Perl's wantarray? Which brings me to a bigger question---do we even want anything like wantarray? It seems so insanely hacky (to me), even in Perl code. Just my humble opinion, Chris.