[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GLISS] differentiating pre/post/neutral commands
From: |
Nicolas Sceaux |
Subject: |
Re: [GLISS] differentiating pre/post/neutral commands |
Date: |
Sat, 1 Sep 2012 22:58:31 +0200 |
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
- Re: how to make decisions?, (continued)
- Re: how to make decisions?, Han-Wen Nienhuys, 2012/09/05
- Re: how to make decisions?, Francisco Vila, 2012/09/05
- Re: how to make decisions?, David Kastrup, 2012/09/05
- Re: how to make decisions?, Keith OHara, 2012/09/05
- Re: how to make decisions? (was: [GLISS] differentiating pre/post/neutral commands), Han-Wen Nienhuys, 2012/09/03
- Re: how to make decisions? (was: [GLISS] differentiating pre/post/neutral commands), Janek Warchoł, 2012/09/03
- Re: how to make decisions?, David Kastrup, 2012/09/03
Re: [GLISS] differentiating pre/post/neutral commands, Xavier Scheuer, 2012/09/01
Re: [GLISS] differentiating pre/post/neutral commands,
Nicolas Sceaux <=
Re: [GLISS] verbifying music functions, Janek Warchoł, 2012/09/03
Re: [GLISS] differentiating pre/post/neutral commands, Janek Warchoł, 2012/09/03