Reinhold Kainhofer <reinh...@kainhofer.com> writes: > However, I'm not sure if this will really work out or give us much benefit. > In particular, we have lots of checks for == SCM_EOL or == SCM_BOOL_T. E.g. > very deep inside the core of lilypond: > > inline bool ly_cheap_is_list (SCM x) {return scm_is_pair (x) || x==SCM_EOL; } > > Is this really not allowed?
The Guile documentation is unambiguous about that: it is not allowed. Guile has scm_is_null which is a macro expanding to the direct comparison with SCM_EOL if the type debugging is switched off, and to something that works and compiles if it is on. I have hit several type bugs (Scheme/integer confusions) so far while looking randomly for the source of my segmentation fault. If we can get the source into a state where the compiler can help with the work of flagging them, that's an advantage. And I don't think it a good idea to rely on explicitly undefined behavior of Guile. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel