[Top][All Lists]

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

Re: Review music functions with pitch and duration arguments

From: David Kastrup
Subject: Re: Review music functions with pitch and duration arguments
Date: Sat, 23 Jul 2011 17:33:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

David Kastrup <address@hidden> writes:

>> The Lilypond codebase does not contain such music function arguments I
>> think.  It should actually work to convert them to
>> #(ly:export (ly:make-pitch ...
>> so there is a straightforward (but more likely than not untowardly
>> awkward) migration path.
>> Apart from this change in semantics, this should not cause
>> regressions.

Reconsidering this matter, I have come to the realization that one could
avoid regressions here simply by still permitting Scheme expressions
(and passing them through the specified validator like ly:pitch?).

I see advantages and disadvantages to that approach.

pro: One can provide more and more specially parsed arguments on a
     contingency base without invalidating previous code.
     This promotes code sloppily interchanging Lilypond and Scheme
     as music function arguments, making music functions behave
     differently from "built-in" Lilypond commands.
     Upgrading code to use ly:export when a predicate becomes specially
     recognized is rather trivial.
Intermediate strategy:
     Allow Scheme for newly converted specially parsed arguments, and
     deprecate and phase out after a while.

Frankly, I consider the bookkeeping for that going a bit overboard for

So my plan would be to just press forward and see whether anybody

> I put the current state up on Rietveld at
> <URL:>
> I don't have a usage example to go with the patch though.  If somebody
> has something nice to offer...

Again: usage example would be welcome.

David Kastrup

reply via email to

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