unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#24955: defining a record type does not also define a GOOPS class in Guile 2.1
@ 2016-11-16 15:26 Thompson, David
  2017-01-09 21:43 ` Andy Wingo
  0 siblings, 1 reply; 2+ messages in thread
From: Thompson, David @ 2016-11-16 15:26 UTC (permalink / raw)
  To: 24955

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-09 21:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-16 15:26 bug#24955: defining a record type does not also define a GOOPS class in Guile 2.1 Thompson, David
2017-01-09 21:43 ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).