[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Does this 'and' construct make sense?
From: |
Richard Shann |
Subject: |
Re: Does this 'and' construct make sense? |
Date: |
Fri, 06 Mar 2015 09:57:24 +0000 |
On Fri, 2015-03-06 at 08:25 +0100, Urs Liska wrote:
> I find
>
> %% switch on debugging.
> #(if (and #t (defined? 'set-debug-cell-accesses!))
> (set-debug-cell-accesses! 5000))
>
> (found in init.ly)
>
> strange.
> Wouldn't it be better ot simply remove the 'and' construct?
> #t evaluates to #t always, isn't it?
The terminology used in the manual is "#t evaluates to true". (And,
indeed #f is the only thing that evaluates to false). I think I then
found it tricky to find where in the manual this concept (true/false)
was explained, but came to understand it applies to the semantics of
"if" and "while".
>
> Or is this one more Scheme subtlety I don't get?
so, I don't think so - the commonest cause is where someone starts with
(if (and Debug (defined? 'xxx))
and then decides not to have a separate Debug flag and replaces it in
bulk with #t
Richard