[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] multiple values module
On 05/22/11 17:43, Peter Bex wrote:
> This behaviour is quite practical and even enables a new idiom;
> procedures can return one "main" value and several additional values
> that you might sometimes need. Then you can just call the procedure
> as if it returned one value when you don't need the extra info.
I like this idiom, too.
At a pinch, I'd suggest that continuations expecting less values than
are found should happily discard the extra values; but continuations
that expect more than are found (most pertinently, expecting one and
getting zero...) should raise an error rather than sliding in an
'undefined value' that will just trip you up further down the road
unless you're careful to check for it (like a NULL in C or Java...)
> Cheers,
> Peter
ABS
--
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports