emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#24955: closed (defining a record type does not als


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#24955: closed (defining a record type does not also define a GOOPS class in Guile 2.1)
Date: Mon, 09 Jan 2017 21:44:02 +0000

Your message dated Mon, 09 Jan 2017 22:43:09 +0100
with message-id <address@hidden>
and subject line Re: bug#24955: defining a record type does not also define a 
GOOPS class in Guile 2.1
has caused the debbugs.gnu.org bug report #24955,
regarding defining a record type does not also define a GOOPS class in Guile 2.1
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
24955: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24955
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: defining a record type does not also define a GOOPS class in Guile 2.1 Date: Wed, 16 Nov 2016 10:26:05 -0500
Hello,

It used to be, in Guile 2.0, that defining a record type <foo> would
also, in an unhygienic manner,  define the GOOPS class <<foo>> for use
with generic methods.  However, in Guile 2.1, this does not happen.
Example:

    (use-modules (srfi srfi-9)
                 (oop goops))

    (define-record-type <foo>
      (make-foo bar)
      foo?
      (bar foo-bar))

    <<foo>> ;; Unbound variable: <<foo>>

Was this an intentional breaking change? I do find it weird that a
variable binding is magically defined, but I still would like some way
to access the class wrapper for a record type without doing something
hacky like:

    (define <<foo>> (class-of (make-foo 'bar)))

Thanks,

- Dave



--- End Message ---
--- Begin Message --- Subject: Re: bug#24955: defining a record type does not also define a GOOPS class in Guile 2.1 Date: Mon, 09 Jan 2017 22:43:09 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
On Wed 16 Nov 2016 16:26, "Thompson, David" <address@hidden> writes:

> Hello,
>
> It used to be, in Guile 2.0, that defining a record type <foo> would
> also, in an unhygienic manner,  define the GOOPS class <<foo>> for use
> with generic methods.  However, in Guile 2.1, this does not happen.
> Example:
>
>     (use-modules (srfi srfi-9)
>                  (oop goops))
>
>     (define-record-type <foo>
>       (make-foo bar)
>       foo?
>       (bar foo-bar))
>
>     <<foo>> ;; Unbound variable: <<foo>>
>
> Was this an intentional breaking change? I do find it weird that a
> variable binding is magically defined, but I still would like some way
> to access the class wrapper for a record type without doing something
> hacky like:
>
>     (define <<foo>> (class-of (make-foo 'bar)))

See NEWS:

  ** Defining a SMOB or port type no longer mucks exports of `(oop goops)'

  It used to be that defining a SMOB or port type added an export to
  GOOPS, for the wrapper class of the smob type.  This violated
  modularity, though, so we have removed this behavior.

I think in the future <foo> should be classy already as a kind of
primitive class -- (class-of (make-foo ...)) should eq? <foo>.  That
doesn't happen now yet though.  Closing as not a bug unless you have
really strong opinions here.

A


--- End Message ---

reply via email to

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