Werner LEMBERG <w...@gnu.org> writes:

>>> This works:
>>>
>>> ```
>>> { \ottava -1 c }
>>> ```
>>>
>>> while this fails:
>>>
>>> ```
>>> { \ottava +1 c'' }
>>> ```
>>>
>>> Is there a technical reason for it?
>>
>> As far as LilyPond is concerned, `+` is not a part of numbers.  Is
>> there a compelling argument for wasting syntactic elements on doing
>> nothing?
>
> I think that 'wasting' is too harsh a statement.  In comparison to
> other syntactical elements (together with the interpretation of Scheme
> code), a change to support `+` has no significant impact, AFAICS.

It makes + inelegible for other purposes.  + as a sign does nothing, so
the language does not gain anything at all.

You could potentially require its use for disambiguating durations from
numbers, but I don't think requiring people to type + all the time is
going to be a crowd pleaser.

`-` is used within chords.  So is `+`.  `-` is specially lexed in chords
because of syntactic conflicts.  That comes with its own bunch of
problems.  `+` isn't.  Yet.

`-` can become a part of numerical tokens in certain syntax modes, so it
isn't just the parser that is involved here but also the lexer.

> Can you imagine any other use for `+` right before numbers?  Otherwise
> I suggest to make it work, to provide the least surprise for users.

Do we say anywhere that `+` is a sign in LilyPond syntax?  Where does
the surprise come from?

-- 
David Kastrup

Reply via email to