[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 22:15:36 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Kieren MacMillan <address@hidden> writes:
> Hi David,
>
>> It's easy to tell the developers "make it so". But before you can tell
>> a compiler to "make it so", you need to have a logically coherent
>> proposal.
>
> I wasn’t trying to tell anybody to "make it so" — I was just avoiding
> offering my limited (and almost certainly flawed) understanding of
> Lily’s underpinnings when others (such as yourself) might give a
> detailed, useful, and accurate answer instead.
>
> However, I’m always happy to have a discussion towards a logically
> coherent proposal that would allow a compiler to "make it so" for some
> given feature/request such as this one.
>
> So here are my first offerings:
>
>> Is c4 a note or a variable name?
>
> If I saw
>
> c4 = something
>
> then I would think it’s a variable. If I saw
>
> c4 something
>
> (i.e., without an assignment operator) I would think it’s a note. Is
> that a rule that can be made logically coherent for a compiler?
No. You'd probably also think that
{ c = -3 }
is an assignment. It isn't. It is a note c with a relative octave
check and a fingering of 3 . I am not enthusiastic about all of the
inherited design decisions but there are a lot of scores and score
writers relying on them.
>> Is \part2 the variable "part" followed
>> by a half note, or is it the variable "part2"?
>
> If I were developing Lilypond code, I simply wouldn’t allow a note
> value to be post-fixed to a variable, so
>
> \part2
It isn't "post-fixed". It is a note of its own.
partI = { tambourine 4. 8 4 4 }
\drums { \rhythm 2 r2 }
is valid LilyPond input.
> would have only one interpretation (i.e., as the variable
> "part2"). But that’s only because I can’t see a good use case for the
> alternative. Can anyone suggest a reason to allow
>
> part = { c4 8 8 }
> \part2
>
> where the latter is intended to do something… um… coherent?
See above.
--
David Kastrup
- Why no numbers allowed in variables?, Maarten Deen, 2018/10/02
- Re: Why no numbers allowed in variables?, Kieren MacMillan, 2018/10/02
- Re: Why no numbers allowed in variables?, Thomas Morley, 2018/10/02
- Re: Why no numbers allowed in variables?, Kieren MacMillan, 2018/10/02
- Re: Why no numbers allowed in variables?, Thomas Morley, 2018/10/02
- Re: Why no numbers allowed in variables?, David Kastrup, 2018/10/02
- Re: Why no numbers allowed in variables?, David Kastrup, 2018/10/02
- Re: Why no numbers allowed in variables?, Kieren MacMillan, 2018/10/02
- Re: Why no numbers allowed in variables?, David Kastrup, 2018/10/02
- Re: Why no numbers allowed in variables?, Kieren MacMillan, 2018/10/02