[Top][All Lists]

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

Re: goops and memoization

From: Mikael Djurfeldt
Subject: Re: goops and memoization
Date: Sun, 24 Nov 2002 11:32:32 -0500
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

Neil Jerram <address@hidden> writes:

> I'm not proposing to pursue the method-definition-time approach.  Out
> of interest, however, are there any hard cases that don't rely on
> multiple inheritance?

Yes.  Consider:

(define-method (foo (x <top>) (y <top>)) 'top)
(define-method (foo (x <real>) (y <integer>)) 'middle)
(define-method (foo (x <integer>) (y <integer>)) (next-method))
(foo 1 1) --> middle
(foo 1.0 1.0) --> top

Best regards,

reply via email to

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