> I'm already writing a section called "C/Scheme interface" where IWell, it works as long as scm_is_eq works the same as ==. But that's an
> explain that scm_integer_p (x) == SCM_BOOL_T isn't correct.
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.
Of course, this is bizarre for newcomers... But there's something else that actually mislead me before we started working on this.
In the Guile reference, it is written that scm_string_p returns #t or #f. And it is also written that scm_is_string returns 0 or 1. Because it isn't written SCM_BOOL_T and SCM_BOOL_F, I always thought 0 and 1 were Scheme values. This, of course, totally broke my understanding of these functions.
I pointed out this logical error in the piece of doc I will push.
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
This also mislead me a long time ago.