Le 1 sept. 2012 à 18:25, Graham Percival a écrit : > Continuing to brainstorm on the problem of it not being obvious to > which note a particular \command refers to, what if we used: > > \postfix: c2 d\p is unchanged > /prefix: for music functions like c2 /parenthesize d > .neutral: for commands which aren't attached to notes, such > as .clef or .times. > > .version "2.16.0" > .score { > /new Staff { > .clef "bass" > .times 3/4 > c4 /parenthesize d\p g .bar "|." > } > }
In most languages, the way you format things (naming, spacing, indentation, etc.) is important, so that a reader can tell what something most probably means, without knowing all the details. When someone does not respect conventions, then reading the code becomes painful. If a prefix music function is consistently named according to some rule (e.g. a verb, as was proposed), and variables to that other rule, then the reading problem is solved. Moreover, if you consistently write a postfix variable next to the thing it is related to, without space, then you cannot confuse it with a prefix function. c\p b <--- no space before => postfix c -\p b <--- explicitely postfix, space is no problem c \parenthesize b <--- verb with a space before => prefix function c \mymusic b <--- a noun with a space before => a variable That's not a syntax/parser issue, imho. Nicolas _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel