|
From: | Mats Bengtsson |
Subject: | Re: Still confused about context vs. new |
Date: | Wed, 06 Aug 2008 14:00:45 +0200 |
User-agent: | Thunderbird 2.0.0.5 (X11/20070716) |
I personally have *never* needed to use \new.Yes, it's certainly possible to use \new vs. \context in this way. However, I think that it's\context implicitly instantiates a new context if the one named doesn't yet exist, so \new is redundant, *except* where you want multiple distinct contexts with the same name, or you're using unnamed contexts (which, internally, is the same thing) Distinct objects should (as a general rule) be named distinctly, so that leaves the only place to use \new: when you want unnamed contexts.
conceptually easier and more pedagogical to use the following strategy: - Use \new whenever you want a new context, be it named or anonymous. - Use \context only when referring to an already existing context .As you have pointed out, this is not enforced by LilyPond, but I still think it's a good habit and
good way to teach about LilyPond.However, there are some fine details about the use of named contexts that I don't understand fully.
I'll start a separate email thread about that in a moment. /Mats
[Prev in Thread] | Current Thread | [Next in Thread] |