[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should we be touching goops?
From: |
David Kastrup |
Subject: |
Re: Should we be touching goops? |
Date: |
Tue, 07 Jun 2022 02:24:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
David Kastrup <dak@gnu.org> writes:
> GOOPS was supposed to cause quite a performance hit with Guile 1.8 when
> used extensively. It wasn't supposed to do this with Guile 2+ so
> something like this should be feasible, also for other types:
>
> #(use-modules (oop goops))
>
> #(define <Moment> (class-of (ly:make-moment 0)))
>
> #(define-method (+ (a <Moment>) (b <Moment>)) (ly:moment-add a b))
> #(define-method (- (a <Moment>) (b <Moment>)) (ly:moment-sub a b))
>
> #(display (- (ly:make-moment 3) (ly:make-moment 4) (ly:make-moment 2)))
>
> For those types where manipulation is frequent enough that we defined
> arithmetic (and possibly other) operators rather than ordinary functions
> in C++, there may be some point in doing the same in Scheme with
> generics.
Putting a bit more meat on what this may mean:
<https://gitlab.com/lilypond/lilypond/-/merge_requests/1404>
--
David Kastrup
- Re: Should we be touching goops?, (continued)
- Re: Should we be touching goops?, Jean Abou Samra, 2022/06/05
- Re: Should we be touching goops?, Luca Fascione, 2022/06/05
- Re: Should we be touching goops?, David Kastrup, 2022/06/05
- Re: Should we be touching goops?, Luca Fascione, 2022/06/05
- Re: Should we be touching goops?, David Kastrup, 2022/06/05
- Re: Should we be touching goops?, Luca Fascione, 2022/06/05
- Re: Should we be touching goops?, David Kastrup, 2022/06/04
Re: Should we be touching goops?, Jean Abou Samra, 2022/06/03
Re: Should we be touching goops?,
David Kastrup <=
Re: Should we be touching goops?, Christopher Heckman, 2022/06/05