[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sets spanner length as a spanner property. (issue4641085)
From: |
address@hidden |
Subject: |
Re: Sets spanner length as a spanner property. (issue4641085) |
Date: |
Thu, 30 Jun 2011 17:38:36 +0200 |
On Jun 30, 2011, at 5:20 PM, Han-Wen Nienhuys wrote:
> On Thu, Jun 30, 2011 at 11:21 AM, <address@hidden> wrote:
>> Reviewers: ,
>>
>> Message:
>> Hey all,
>>
>> This patch simplifies a lot of code duping I'm doing to get spanner
>> lengths in various scheme functions. Please lemme know if it's OK!
>
> Why is length not computed as a callback? You should avoid
> set_property() as much as possible, since the order in which the code
> calling set_property() is not defined. Hence, readers of the length
> property cannot be sure that it has been set.
>
There's no issue with computing this as a separate callback save the fact that
it'd result in a code dup with the normalized endpoints callback.
> What calculations are simplified? Can you include examples? I am
> sure that the lilypond code uses spanner length in a ~100 places or
> so. If you are starting to use a property for length, your code
> should have a 100 places changed.
>
This makes it easier to do manipulations on a line-breaking spanner whose
different pieces are not supposed to be copies of each other.
> I think you scheme code will be easier to follow if you just define a
> function that computes the length, if given a spanner.
>
I have a version of this written in Scheme that I use in my graphical notation.
I'll throw up a new patch with this in the not-too-distant future. But,
again, it is a code dup from the normalized endpoints callback, which can
calculate both spanner length and normalized endpoints in one fell swoop (at
the expense of using set_property).
Cheers,
MS
- Sets spanner length as a spanner property. (issue4641085), mtsolo, 2011/06/30
- Re: Sets spanner length as a spanner property. (issue4641085), mtsolo, 2011/06/30
- Re: Sets spanner length as a spanner property. (issue4641085), n . puttock, 2011/06/30
- Re: Sets spanner length as a spanner property. (issue4641085), n . puttock, 2011/06/30
- Re: Sets spanner length as a spanner property. (issue4641085), mtsolo, 2011/06/30
- Re: Sets spanner length as a spanner property. (issue4641085), ColinPKCampbell, 2011/06/30