bug-lilypond
[Top][All Lists]
Advanced

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

Re: bar number position (direction) numerical definitions overlap


From: Paul Scott
Subject: Re: bar number position (direction) numerical definitions overlap
Date: Wed, 02 Aug 2006 10:37:58 -0700
User-agent: Thunderbird 1.5.0.4 (X11/20060713)

Alan Stern wrote:
On Wed, 2 Aug 2006, Mats Bengtsson wrote:

As I have already tried to explain, several different layout objects have the "direction" property and for some objects it means UP/DOWN for others it means LEFT/RIGHT.

Ideally, we should have different documentation texts for these two situations. However, for technical reasons, the documentation of a property is the same for all objects where the property appears. This in turn means that the text has to cover all the situations, i.e. it has to mention both up/down and left/right. In this particular case it's possibly a bit confusing but all the information is there.

Surely the real underlying problem is that the _same_ property is used for both horizontal directions and vertical directions.
That was definitely one of my points. As an object oriented-developer I do understand how a property came to be used in the code this way.
If there were two different types of property then there would be no confusion. It would even be possible to apply both sorts of correction to the same object, which is impossible now.
That would require individual code to be designed and written for each layout object that needed both directions. Of course many if not all layout objects might not need it. There are a number of direction properties which have different but similar names (like head-direction) but have the same values (-1, 0, 1) and probably have similar logic, This could be a start if there are any layout objects which really need both vertical and horizontal directions.
I don't know if there ever was a real reason for having only one sort of
"direction" property; perhaps it was nothing more than laziness.
I long ago learned that laziness when thought of in the right way is a very useful quality in a developer. I think it really happened the other way. The very common development idea of a variable with three values goes back to the very beginning of software and even hardware design.
 And
changing it at this point might be an uncomfortably big task. Nevertheless, it seems like the right thing to do.
Having both directions may not be needed for any layout objects. If you know of any where you think it would be useful you might want to mention it. I mistakenly thought it was part of the design of the BarNumber layout object so my main objection turned out to be with the documentation.

Paul





reply via email to

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