Alongside issue #5473, I’ve started investigating whether numbers
still require to be prefixed with #.
AFAICS, the only ones that still do are in markups and all markups
commands, but hardly anywhere else; which _could_ make LilyPond syntax
a tiny bit easier to grasp for new users…
Or we can still use # everywhere as a matter of principle, even though
it’s no longer a hard requirement. (Pro: less possible confusion with
durations and better consistency with markup commands; Con: it’s one
of those things experienced LilyPonders hardly notice anymore, but
that do make the entry code a tad more exotic-looking to newcomers.)
My proposal would be to add convert-ly rules for:
-any \override, \set or \tweak involving a number-defined property
(including integers, decimals and negative numbers).
-also handle properties defined at the context-creation level, i.e. in
\with or \layout blocks.
-any music functions with a number arg:
as well as phrasingSlurDashPattern, slurDashPattern and tieDashPattern
(and the new \dropNote etc. functions I recently added).
Now,this may be tricky as some of those have optional args,
number-or-markup args etc. Things like \ottava are quite
-Mainly use non-# numbers in the docs, that is: everywhere *except* in
NR1.8 Markup where we’d need to explain that markup commands require
numbers to be explicitely handled as Scheme tokens.
-To stay on the safe side, possibly leave user-defined music functions
unchanged for now. (Which includes some regtests like
input/regression/rest-ledger.ly and quite a bunch of LSR snippet.)
… Or, we just don’t bother and keep using (and recommending) # everywhere.
Indeed. That’s probably rare enough that we could get away with a
@knownissues in the right place(s), though…
Right now, the new ability to have #-less numbers (and strings,
although my recent patch changes that) isn’t documented anywhere but
the git log. Do we want to keep it that way so as not to risk users
getting confused? Seems a bit unfair.
On Thu, Feb 21, 2019 at 7:44 AM Kieren MacMillan <
[hidden email]> wrote:
> Hi Valentin,
> > Or, we just don’t bother and keep using (and recommending) # everywhere.
> > Thoughts?
> I use # everywhere I can, even where it’s not strictly necessary, in part
> because it visibly sets arguments apart for easy parsing [by me].
> Not sure if that’s useful input for you?
Hi Kieren, Valentin,
I've shifted my practice the opposite direction of Kieren's, I suppose: I
omit # before numbers everywhere that it's possible to do so.
No real Lily rationale here, other than a personal coding practice to
employ the (lexically) shortest version of equivalent statements. I think
the original impulse came years ago when I was trying to rid myself of
redundant precedence indicators, eg, to use "a + b * c" everywhere in place
of "a + (b * c)"; because the two forms are equivalent (in most languages),
I wanted a canonical version for myself that I could spot at a glance. That
practice leaked into my Lily code, with the slight preference now for "99"
to "#99" where the forms are equivalent.