lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fixes boolean/SCM confusions, part 1. (issue 4875054)


From: Han-Wen Nienhuys
Subject: Re: Fixes boolean/SCM confusions, part 1. (issue 4875054)
Date: Fri, 19 Aug 2011 17:34:56 -0300

On Fri, Aug 19, 2011 at 6:14 AM, Bertrand Bordage
<address@hidden> wrote:
>> It is somewhat amusing, by the way, that Lilypond's to_boolean is
>> required in order to let '() and #f be interpreted in the same manner.
>> It would seem that Lisp's conflating them into `nil' is not the worst
>> idea.
>
> This also mislead me a long time ago.

It's a historical artefact of old lilypond code that would add objects
to lists like

  set_property("foo", scm_cons(bla, get_property("foo"))

for this to work, the default value of get_property() must be '().
For booleans, it's a reasonable default to be off, so we have to
interpret '() as false.

Scheme has a similar confusion in that all non-#f values are
interpreted to be true.

-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]