lilypond-devel
[Top][All Lists]
Advanced

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

Re: naming a data type


From: Han-Wen Nienhuys
Subject: Re: naming a data type
Date: Thu, 04 May 2006 13:13:56 +0200
User-agent: Thunderbird 1.5 (X11/20060313)

Joe Neeman schreef:
I would like to add a forbid/force/default datatype to lilypond. In C++, it would be represented by
enum {
        FORBID = -1,
        DEFAULT = 0,
        FORCE = 1
}

and in scheme it would be

(define-public FORBID -1)
(define-public DEFAULT 0)
(define-public FORCE 1)

with the usual ly_scm2XXX functions.

But I have no idea what to call this data type. The best I could come up with (inspired by Drul) is Fordfor (FORbid, Default, FORce). Any better suggestions?

Why an enum? Isn't an SCM symbol ( 'forbid vs. 'force) more appropriate?

The reason for having Drul is that lots of computations are symmetrical in up/down/left/right, so it makes sense to have a representation that you can compute with.

--

Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com





reply via email to

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