unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: "Thompson, David" <dthompson2@worcester.edu>
To: 24955@debbugs.gnu.org
Subject: bug#24955: defining a record type does not also define a GOOPS class in Guile 2.1
Date: Wed, 16 Nov 2016 10:26:05 -0500	[thread overview]
Message-ID: <CAJ=RwfbO2tbztsi4W2EVmnsKQbOAZ4NBBq29Zg=Zhw3sAc11VA@mail.gmail.com> (raw)

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





             reply	other threads:[~2016-11-16 15:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-16 15:26 Thompson, David [this message]
2017-01-09 21:43 ` bug#24955: defining a record type does not also define a GOOPS class in Guile 2.1 Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ=RwfbO2tbztsi4W2EVmnsKQbOAZ4NBBq29Zg=Zhw3sAc11VA@mail.gmail.com' \
    --to=dthompson2@worcester.edu \
    --cc=24955@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).