[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (cond (else => display))
From: |
Martin Grabmueller |
Subject: |
Re: (cond (else => display)) |
Date: |
Mon, 15 Oct 2001 09:48:44 +0200 |
> From: Dirk Herrmann <address@hidden>
> Date: Sat, 13 Oct 2001 17:33:01 +0200 (MEST)
>
> what should the result of (cond (else => display)) be? Currently it is
> #t, which is because memoization transforms the else to #t.
>
> IMO:
>
> (define => 'foo)
> (cond (else =>))
> --> 'foo
> (cond (else => display))
> --> #<primitive-procedure display>
>
> This would require to change the memoization not to transform the else to
> #t (in order to be able to distinguish it from a user given clause
> (#t => display), and to change the evaluator accordingly.
>
> Opinions?
I think that behind-the-scenes transformations which affect the
semantics of a syntactic form in a strange way (such as else => #t)
should be avoided. In Sizzle, I had implemented it the way Dirk
suggests, but it will require an additional test/conditional jump in
the evaluator. I think this is worth it and we should change it that
way, but other opinions are welcome.
Best regards,
'martin