Status: Accepted
Owner: ----
New issue 3139 by [email protected]: Replace abuse of Moment type for everything
rational
http://code.google.com/p/lilypond/issues/detail?id=3139
For historical as well as irrational (why not create a Scheme type
corresponding to C++ Rational?) reasons, LilyPond has used the Moment type
as a Scheme level substitute for rational arithmetic, dating back to a time
when GUILE did not support rational arithmetic.
Associated peculiarities includes operators like ly:moment-add,
ly:moment-sub, ly:moment-mul and similar usage ranging from the strange to
the absurd. The use of moments should be replaced with Scheme rationals
whenever there is no chance that the grace part of the moment can't
possibly be non-zero.
In addition, it might well make sense to not use it for any kind of length,
either, since moment arithmetic including grace length is inconsistent
anyway, and reduce its use to indicating only absolute time positions.
Doing this thoroughly will significantly reduce the battleground for issues
like issue 3085 and issue 34.