lilypond-devel
[Top][All Lists]
Advanced

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

Re: Context aliases


From: Han-Wen Nienhuys
Subject: Re: Context aliases
Date: Tue, 07 Nov 2006 12:22:59 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20061027)

Erik Sandberg escreveu:
On Monday 06 November 2006 17:02, Han-Wen Nienhuys wrote:
Erik Sandberg escreveu:
I think this will be an improvement, because we remove the concept of
aliases, which confuses users (at least it confuses me a bit); in
addition we don't need to do anything extra to softcode aliases.
I don't understand. How will this work in practice?  Ie. if I do

   \set Timing.measurePosition = #..

how will it be processed?
We will have to change that to an \applyContext which finds/creates a
context with the 'timing property set, something like
\findContextWithPredicate #'timing \set measurePosition = #...
I still don't understand why you want to scrap it.

The main reason is to have one event less in the stream API (if we will keep the current alias mechanism, I will have to create an add-alias stream event). IWBN to keep that API minimal, and to me it seems that aliases aren't much used anyways.

However, you have a very point that functions like \applyoutput will get more complicated if we want to keep full backward compatibility.

I wouldn't say that they are not used often. Every \override and \set would start use \findContextWithPredicate. Eg. RhythmicStaff/RhythmicVoice has a \context Staff / \context Voice alias. That doesn't strike me as a tight API.

Is it necessary to solve this problem now?

--

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]