guile-user
[Top][All Lists]
Advanced

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

Re: GOOPS question


From: Mikael Djurfeldt
Subject: Re: GOOPS question
Date: Fri, 30 Apr 2021 13:08:30 +0200

On Fri, Apr 30, 2021 at 1:11 AM Damien Mattei <damien.mattei@gmail.com>
wrote:

> for example in the doc there is:
> (define-class <my-complex> (<number>) r i #:name "Complex")
>
> seems <number> superclass is of no use
>

Well, it certainly *is* of use in the sense that methods operating on
<number> will immediately start to also accept <my-complex> as an argument.
That might seem worrisome but is not if there is some agreement on which
operations should be implemented for all numbers. So, if you had previously
written an algorithm which operates on numbers, there's now a good chance
that it would also work for <my-complex> objects.


reply via email to

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