guile-devel
[Top][All Lists]
Advanced

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

Re: Unintentional conflict in define-immutable-type?


From: Ludovic Courtès
Subject: Re: Unintentional conflict in define-immutable-type?
Date: Fri, 27 Nov 2015 21:37:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Rob Browning <address@hidden> skribis:

> Ludovic Courtès <address@hidden> writes:
>
>> The convention is indeed to use <foo> for the RTD.
>
> ...and so (just to clarify) the goops class for a record is supposed to
> be <<foo>> by default, and you'd need to (define <foo> <<foo>>) yourself
> afterward, if you wanted the goops class to appear more conventional?

Yes, I’m afraid.

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use(srfi srfi-9)
scheme@(guile-user)> ,use(oop goops)
scheme@(guile-user)> (define-record-type <foo>
                       (make-foo x)
                       foo?
                       (x foo-x))
scheme@(guile-user)> <foo>
$2 = #<record-type <foo>>
scheme@(guile-user)> <<foo>>
$3 = #<<class> <<foo>> 1c4b960>
scheme@(guile-user)> (eq? <foo> <<foo>>)
$4 = #f
--8<---------------cut here---------------end--------------->8---

The proxy class is created by ‘make_class_from_symbol’ in
libguile/goops.c (in 2.0.)

Ludo’.



reply via email to

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