lilypond-devel
[Top][All Lists]
Advanced

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

Re: pygment regex question


From: Lukas-Fabian Moser
Subject: Re: pygment regex question
Date: Sat, 26 Nov 2022 17:54:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

Hi Jean,

FWIW, the last one

a4_boringly

is something I wouldn't do, since

a_boringly

does not work

Yes, d'accord.

Personally, I tend to leave out # when possible for numbers,
and also leave out #' for symbols when possible because it
is not only shorter, but allows the syntax highlighting program
to highlight them specially if they're built-ins, be it
in Frescobaldi or in the documentation via Pygments.
On the other hand, I usually use " marks (but not # when
not required) around strings, because I might want to add
spaces in them, and once again because it makes the syntax
highlighting more useful.

For \new Staff = <this>, I never settled my mind :-)  It
expects a string, but then one could argue that accepting
a symbol here would more sense.

I see it mostly from a "didactical" perspective: LilyPond syntax is hermetical enough as it is (if you're looking at it from a non-CS/Math/... person's perspective), and having to write #' is just something that I want to avoid having to explain and justify to my musician colleagues as long as possible.

It may be trivial, but to me,

\override NoteHead.color = red

actually lowers the barrier immensely compared with

\override NoteHead #'color = #red

- of course that's more than one syntax simplificiation here, but it shows how much David's improvements have improved accessibility.

But, as I said before: Making everything seem perfectly simple (no #, no ', no "") is bound to put the user in a situation sooner or later where things are not so simple anymore, and we have to explain why they need to use additional symbols in their specific case. But in any case, I'm much more inclined to explain about string delimiters "" than about #'.

Lukas




reply via email to

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