[Top][All Lists]

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

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

From: David Kastrup
Subject: Re: Fixes boolean/SCM confusions, part 1. (issue 4875054)
Date: Fri, 19 Aug 2011 10:35:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Bertrand Bordage <address@hidden> writes:

> I think so.
> I'm already writing a section called "C/Scheme interface" where I
> explain that scm_integer_p (x) == SCM_BOOL_T isn't correct.

Well, it works as long as scm_is_eq works the same as ==.  But that's an
implementation detail of Guile and not part of the Guile API.  Bypassing
the Guile API here does not buy us anything regarding efficiency, and it
is not helpful for debugging and newcomers who should not be required to
know internals of Guile.

> I also start a list of functions like to_boolean explaining why and
> how to use them.
> As an expert of these issues, you will probably want to add some
> details after I push that :)

Actually, I am far from being an expert.  Most of my respective
knowledge is less than two days old, gained mostly by cross-reading and
consolidating Guile and Lilypond docs and C sources.  The point is that
for a newcomer, reading the respective docs should tell enough of the
story to make them reasonably comfortable with reading Lilypond code
instead of going WTF?!? right away.

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

But that may not be enough reason to let Lilypond use the Elisp mode of

David Kastrup

reply via email to

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