lilypond-devel
[Top][All Lists]
Advanced

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

Re: get rid of minimum-[XY]-extents (issue 6294086)


From: david . nalesnik
Subject: Re: get rid of minimum-[XY]-extents (issue 6294086)
Date: Tue, 19 Jun 2012 21:38:38 +0000

On 2012/06/19 10:37:28, janek wrote:
Hi Keith,
David (i'd like to know your opinion about something here)
and all,

> The minimum-*-extent is convenient when you want extra
> space on one side, and don't want to think about what
> extent the object should have on the other side.

Indeed they can be handy in situations like that.
However, i think that we should approach this problem differently,
in a more flexible and less hard-coded way.

Here's the downside of minimum-*-extent solution: what if i need to
specify extent's upper bound instead of lower one?  There's no
"maximum-[XY]-extent" property.  What if i want to restrict
[XY]-offset?
Again, [minimum|maximum]-[XY]-offset properties don't exist.
So, should we create them for all similar properties?
Surely not, that would be a hell lot of boilerplate code!

I think that we should use scheme functions for things like that.
I'm pretty sure that one can easily write a scheme function
which would set [XY]-extent to at least something.
Or a funtion that would modify only one element in a pair.
David, could you confirm that it's possible to easily define
such funtions?

It's no problem to create higher-order functions, and you can easily
manipulate the elements of pairs and lists in any number of ways.  What
I can't visualize here is how a procedure which, say, limits the
elements of a pair to a maximum, should be called (if not as a music
function, as I did in the offsetting function you mention below).

Keith, for an illustration of such "modifying functions" see this
email from David Nalesnik:
http://lists.gnu.org/archive/html/lilypond-devel/2012-06/msg00102.html



http://codereview.appspot.com/6294086/



reply via email to

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