Bertrand Bordage <[email protected]> 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 idea. But that may not be enough reason to let Lilypond use the Elisp mode of Guile. -- David Kastrup _______________________________________________ lilypond-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-devel
