[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add support for record types in GOOPS methods?
From: |
Thompson, David |
Subject: |
Re: Add support for record types in GOOPS methods? |
Date: |
Tue, 21 Oct 2014 12:00:51 -0400 |
On Tue, Oct 21, 2014 at 11:37 AM, Panicz Maciej Godek
<address@hidden> wrote:
>
> Hi!
> As I managed to find out, the (define-record-type t ...) also introduces a
> GOOPS class named <t>. Following your example, you'd need to define your
> method in the following way:
>
> (define-method (foobar (foo <<foo>>))
> (foo-bar foo))
>
> I don't think any further changes are needed (perhaps a section in the
> documentation would be nice)
I had no idea that magic was happening. Thanks! That solves my
immediate need, though I think defining something that I didn't
explicitly ask for is strange.
I thought that I could make this technique fail by defining the record
type before importing (oop goops), but it still worked. Why?
- Dave