[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for better multiple values support
From: |
Keisuke Nishida |
Subject: |
Re: Patch for better multiple values support |
Date: |
Thu, 10 May 2001 10:30:30 -0400 |
User-agent: |
Wanderlust/2.4.1 (Stand By Me) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.0.102 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) |
At 10 May 2001 11:24:16 +0200,
Matthias Koeppe wrote:
>
> The patch shown below does the following:
>
> A) It replaces the fancy write representation of values with a
> sharp-angle representation like this: #<values (3 4)>. This is the
> right thing to do because of reason 1) and because the intermediate
> values objects do not have a read representation.
>
> B) It changes the read-eval-print loop in order to explicitly deal
> with multiple values, rather than relying on Guile's "ability" to
> pass multiple values to single-value continuations.
I like this; however,
> (define (error-catching-repl r e p)
> - (error-catching-loop (lambda () (p (e (r))))))
> + (error-catching-loop
> + (lambda ()
> + (call-with-values (lambda () (e (r)))
> + (lambda the-values (p the-values))))))
I think the following is better:
+ (call-with-values (lambda () (e (r)))
+ (lambda the-values (for-each p the-values))))))
Then you don't need to modify the printer.
If nobody objects, I'll apply the patch.
Keisuke