[Top][All Lists]

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

Re: Should we be touching goops?

From: Carl Sorensen
Subject: Re: Should we be touching goops?
Date: Fri, 3 Jun 2022 08:12:37 -0600

On Fri, Jun 3, 2022 at 7:21 AM David Kastrup <> wrote:

> Dan Eble <> writes:
> > On Jun 2, 2022, at 20:32, David Kastrup <> wrote:
> >>
> >> #(define-method (+ (a <Moment>) (b <Moment>)) (ly:moment-add a b))
> >> #(define-method (- (a <Moment>) (b <Moment>)) (ly:moment-sub a b))
> >
> > Could we also introduce a distinction in type between points and spans
> > of time?  "Measure 12 minus Measure 8" is 4 measures, but it is not
> > Measure 4; and "Measure 12 plus Measure 8" is not a thing.
> While I get your point, I think that this ship has sailed.  That's not
> as much a problem of GOOPS but of the preexisting code.
> I think the first point of cleanup would be to replace Moment's misuse
> as a substitute for "Rational" (which did not have a Scheme
> representation and was done at a time where Guile did not have
> "arbitrary" precision rationals), like in baseMoment.

I think that baseMoment is exactly the kind of use that that Dan is

baseMoment is a "Moment Span", that is, a separation between two distinct
moments in time.

I think that we need the concept of a Moment Span.  Although it can be
represented as a Rational (as long as we ignore the Grace part), just using
a Rational does not carry the semantics of a Moment Span.

As I see it, a Moment represents a span from time 0, with the time 0 being
implied.  It seems like we ought to be able to represent a moment span as a
pair of Moments.


> --
> David Kastrup

reply via email to

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