[EMAIL PROTECTED] writes: > > > > in most of lily, we return SCM_EOL for this, as it makes prepending > > onto lists nicer. > > Eh, well, gh_assoc() returns SCM_BOOL_F - and the code will be quite > messy if the two similar functions return different sorts of arguments > meaning the same thing... Please argue a bit more...
The interface of gh_assoc and these other functions is different: with gh_assoc you get the handle back (or #f it's not there). With the function you write, you get some default value back when the key is not there. Within LilyPond, the convention for default, unassigned properties is to be '() (i.e. SCM_EOL), and a predicate is true if P == #t. This is dissimilar to Scheme (where true means != #f), but it works nicely for our application, which involves a lot of adding to lists. -- Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.cs.uu.nl/~hanwen/ _______________________________________________ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
