unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: "Thompson\, David" <dthompson2@worcester.edu>
Cc: 24955-done@debbugs.gnu.org
Subject: 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	[thread overview]
Message-ID: <87tw97ap02.fsf@pobox.com> (raw)
In-Reply-To: <CAJ=RwfbO2tbztsi4W2EVmnsKQbOAZ4NBBq29Zg=Zhw3sAc11VA@mail.gmail.com> (David Thompson's message of "Wed, 16 Nov 2016 10:26:05 -0500")

On Wed 16 Nov 2016 16:26, "Thompson, David" <dthompson2@worcester.edu> 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





      reply	other threads:[~2017-01-09 21:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=87tw97ap02.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=24955-done@debbugs.gnu.org \
    --cc=dthompson2@worcester.edu \
    /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).