bug-lilypond
[Top][All Lists]
Advanced

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

Re: Issue 1322 in lilypond: \context must die (whenever \new can be used


From: lilypond
Subject: Re: Issue 1322 in lilypond: \context must die (whenever \new can be used instead)
Date: Wed, 13 Oct 2010 16:32:24 +0000


Comment #9 on issue 1322 by Carl.D.Sorensen: \context must die (whenever \new can be used instead)
http://code.google.com/p/lilypond/issues/detail?id=1322

As Trevor posted in the list (but not on the issue here), a change requiring \context to include a name for the context would be appropriate.

I don't think we should encourage new users to use \new for named contexts; I think we should encourage users to use \new for anonymous contexts.

Anonymous contexts, by their very nature, can't be reused in another included file. Hence, it makes sense to use \new for them -- we want a new context, we don't care what its name is, and its life will be limited to this file. Anonymous contexts also can't be selected somewhere else in the same file. And the purpose of \context is to select a context, so it doesn't make sense to be used with anonymous contexts.

Named contexts, on the other hand, can be reused. And they can exist in multiple files, to be combined by inclusion. Since they can exist in multiple files, we have no idea when the context is created (but the iterator does). And they can be selected elsewhere.

So I'd propose that we set our standard that anonymous contexts are created with \new, and named contexts are created (and selected) with \context.

If the summary of the issue were changed to "\context must be used only with named contexts", I'd be totally on board.




reply via email to

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