On Fri, Aug 19, 2011 at 6:14 AM, Bertrand Bordage
<[email protected]> 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 - [email protected] - http://www.xs4all.nl/~hanwen

_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to