Does this 'and' construct make sense?

2015-03-05 Thread Urs Liska
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? Or is this one more Scheme subtlety I don't get? Be

Re: Does this 'and' construct make sense?

2015-03-06 Thread Jacques Menu
Hello Urs, You’re right, "#t or X" is always #t, and "#t and X" is just X. JM > Le 6 mars 2015 à 08:25, Urs Liska a écrit : > > I find > > %% switch on debugging. > #(if (and #t (defined? 'set-debug-cell-accesses!)) > (set-debug-cell-accesses! 5000)) > > (found in init.ly) > > strange. > W

Re: Does this 'and' construct make sense?

2015-03-06 Thread Richard Shann
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

Re: Does this 'and' construct make sense?

2015-03-06 Thread Urs Liska
Am 06.03.2015 10:57, schrieb Richard Shann: 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' c

Re: Does this 'and' construct make sense?

2015-03-06 Thread Richard Shann
On Fri, 2015-03-06 at 11:18 +0100, Urs Liska wrote: > Am 06.03.2015 10:57, schrieb Richard Shann: > > 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)) >

Re: Does this 'and' construct make sense?

2015-03-06 Thread Richard Shann
On Fri, 2015-03-06 at 09:57 +, Richard Shann wrote: > 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". ... and of "and", "or" perhaps others too that are not leaping t

Re: Does this 'and' construct make sense?

2015-03-06 Thread Urs Liska
Am 06.03.2015 11:34, schrieb Richard Shann: On Fri, 2015-03-06 at 11:18 +0100, Urs Liska wrote: Am 06.03.2015 10:57, schrieb Richard Shann: 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-cel