bug-lilypond
[Top][All Lists]
Advanced

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

Re: Issue 2149 in lilypond: Patch: Creates non-negative-integer? predica


From: lilypond
Subject: Re: Issue 2149 in lilypond: Patch: Creates non-negative-integer? predicate.
Date: Fri, 06 Jan 2012 13:53:08 +0000


Comment #21 on issue 2149 by address@hidden: Patch: Creates non-negative-integer? predicate.
http://code.google.com/p/lilypond/issues/detail?id=2149

I have turned to the Guile manual for guidance about what would fit into the scheme of names, and we have basically "length" as a textual description for things like vector sizes or "index" for addressing them.

Guile actually has no problems creating a vector of length 0. "length" in LilyPond is likely not a good idea since it suggests metric lengths, and also does not obviously include 0. index? is not all that optimal since using it for the size rather than the index of an array is a bit strained (it's basically the index beyond the array). However, it seems less strained than using "count?" as an index type since one does not really _count_ the values processed so far.

And I think it will usually correspond rather closely to what we would be using it for.

Barring protests in the next few days, I'll check in a version using index? instead. I think that it should, for most of our purposes, be more natural than non-negative-integer?. For a similar reason, I had created a predicate fraction? rather than non-negative-integer-pair?. It does not capture all possible uses of this predicate, but for the real existing uses, being totally exact would be much more cumbersome.




reply via email to

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