[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unintentional conflict in define-immutable-type?
From: |
Rob Browning |
Subject: |
Re: Unintentional conflict in define-immutable-type? |
Date: |
Sat, 21 Nov 2015 20:12:22 -0600 |
User-agent: |
Notmuch/0.20.1 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) |
Mark H Weaver <address@hidden> writes:
> I believe you are mistaken about that. Looking at both the code and the
> expansion of your 'define-immutable-record-type' form above, I see no
> evidence that <foo> is bound to anything by it.
I imagine it's actually goops that's doing it.
Try using "define-immutable-type <foo>" and then add a (display
<<foo>>).
That's what prompted my original post, I thought it might be handy to be
able to use define-immutable-type (and the other record definitions) to
create "normal" goops class names.
So that you can have:
(define-immutable-type foo ...)
(define-method (bar (x <foo>)) ...)
instead of only supporting:
(define-immutable-type <foo> ...)
(define-method (bar (x <<foo>>)) ...)
Of course you can always just:
(define <foo> <<foo>>)
afterward, but that's not quite right.
I could just use goops classes, but I was interested in immutability,
and at the moment they don't appear to support it.
Thanks
--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4