lilypond-devel
[Top][All Lists]
Advanced

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

Re: Accidentals Patch 1.5.24


From: Han-Wen Nienhuys
Subject: Re: Accidentals Patch 1.5.24
Date: Sun, 9 Dec 2001 18:40:26 +0100

address@hidden 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   |   address@hidden    | http://www.cs.uu.nl/~hanwen/




reply via email to

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