[Top][All Lists]

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

Re: New argument types (Was: Constructive Criticism and a Question)

From: Erik Sandberg
Subject: Re: New argument types (Was: Constructive Criticism and a Question)
Date: Tue, 9 Jan 2007 09:24:21 +0100
User-agent: KMail/1.9.5

[moving to -devel]

On Monday 08 January 2007 09:30, Mats Bengtsson wrote:
> address@hidden wrote:
> > Increasing the number of different argument types for music functions
> > would almost certainly be extremely useful for users, who, judging from
> > this mailing list, seem to have an unlimited imagination when it comes to
> > wanting to be able to extend LP syntax.
> I doubt that the number of argument types is any major problem. The

I disagree: I think it would be useful to have more argument types; this would 
make it possible to soft-code more of the commands that now are hard-coded in 
the parser.

Also, more argument types would make it possible to implement some functions 
more cleanly, which makes the lily<->scheme connection easier to understand 
(it is not very clean to say \myFunction s2. if you mean \myFunction 2., 

I have been thinking; I see two ways to make durations work as function 
- Forbid space between pitch and duration in notes; create separate token 
PITCH_AND_DURATION (it's unclean in a sense, and requires a small hack in the 
lexer, but might be worth it). It shouldn't be too hard to write a convert-ly 
rule for this, but in any case it could be wise to postpone this change to 
- Only allow durations as the first few parameters of music functions (so 
(duration? music?) is allowed, but not (music? duration?)). I think this is a 
dangerous path, as the rules for which signatures to allow can grow complex 
if we find more argument types with similar problems.



reply via email to

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