lilypond-user
[Top][All Lists]
Advanced

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

Re: Why no numbers allowed in variables?


From: David Kastrup
Subject: Re: Why no numbers allowed in variables?
Date: Tue, 02 Oct 2018 23:16:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Thomas Morley <address@hidden> writes:

> Am Di., 2. Okt. 2018 um 22:37 Uhr schrieb Kieren MacMillan
> <address@hidden>:
>>
>> Hi Harm,
>>
>> > val = "foo"
>> > <<
>> >  \new Staff \repeat unfold 4 c'4
>> >  \new Lyrics \lyricmode { \val4 \val2 \val4 }
>> >  \new Lyrics \lyricmode { \val4 \val4 \val2 }
>> >>>
>> >
>> > Your proposal would make it impossible.
>>
>> Another good example — thanks. That being said, putting a syllable
>> in a variable and then adding durations to it seems to me — as
>> someone who engraves a *huge* amount of vocal music, from a wide
>> variety of styles, genres, and eras — like a *much* "fringe-i-er"
>> case than the number of cases that would benefit from restricting
>> \variableName2 to count as a variable name.
>>
>> Regardless, it doesn’t seem like there’s much enthusiasm to pick up
>> the feature request.
>
> Not so hasty ;)
> Though, I second David. We would need a logical coherent method.
> Without having to much drawbacks.
> Honestly, I don't have such a proposal and even if I would have one,
> I'm not able to implement something like that.

I've had a few cases of convincing myself that "this should be doable"
where the parser generator disagreed with me and I had to fire up some
scripts of mine that constructed examples based on the parser's analysis
that were ambiguous.

Of course it's just anecdotal handwaving to bring this up in relation to
a specific proposal.

> Otoh, counting use-cases is not a bad argument either.

This particular use case can be handled by using quotation marks for
both definition and use, using
"violins1" = ...
and calling with \"violins1"

And of course, with somewhat restricted generality,

violins.1 = { e' e' e' e' }
violins.2 = { c' c' c' c' }

\new Staff << \violins.1 \\ \violins.2 >>

will also work.  Not for everything, but at least for most music
expressions.

So it's not like "use cases" for people rejecting Roman numberals on
principle are not doable.  Stuff just looks uglier.

-- 
David Kastrup



reply via email to

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