Janek Warchoł <janek.lilyp...@gmail.com> writes: > Hi, > > 2014-07-30 0:54 GMT+02:00 David Kastrup <d...@gnu.org>: >> Janek Warchoł <janek.lilyp...@gmail.com> writes: >>> As i said, defining new instrument contexts is very cheap - you can just do >>> >>> \newInstrument "ViolinI" "Violin" "StaffGroup"\with { } \with { } >>> \newInstrument "ViolinII" "Violin" "StaffGroup"\with { } \with { } >>> >>> and have ViolinI and ViolinII available. >> >> Would it be feasible to put the context mods _before_ some reasonably >> related argument, possibly like >> >> \newInstrument \with {} "ViolinI" "Violin" \with {} "StaffGroup" >> >> or probably >> >> \newInstrument "Violin" \with {} "ViolinI" \with {} "StaffGroup" ? >> >> Because when they are before a related non-optional argument, one can >> make them optional. Then if they are just \with {} anyway, you can omit >> them. > > Good idea! I'm fine with changing the order of the arguments; the > function is still in the experimental phase and there's not much code > depending on it. > > However, i'm not yet sure what would be the most intuitive and > optional-argument friendly order of arguments; somehow your suggestion > doesn't seem natural for me (but i don't feel strongly about it). > Does anyone else have opinions?
Well, if the optional arguments should be independently optional, they must each be followed by a mandatory argument. To me it makes the most sense to place them before the argument they "apply to": that arrangement should always work. I don't actually know which of the names are context types, and which are context names. So I cannot really vouch for the best order. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user