From: "Thompson, David" <dthompson2@worcester.edu>
To: Christopher Howard <christopher.howard@qlfiles.net>
Cc: Guile User Mailing List <guile-user@gnu.org>
Subject: Re: Goops: Setting Immutible Classes?
Date: Fri, 6 Oct 2017 08:55:53 -0400 [thread overview]
Message-ID: <CAJ=RwfYS4ZoGrK=xUXL-uzMjbpGO=WS73wo4Cq6oQCd-yKHHRA@mail.gmail.com> (raw)
In-Reply-To: <1507269654.28034.8.camel@qlfiles.net>
On Fri, Oct 6, 2017 at 2:00 AM, Christopher Howard
<christopher.howard@qlfiles.net> wrote:
> Hi, is the a way I could use goops such that I the classes are non-
> mutating, but have setters that simply return a new instance of the
> class (instead of modifying the original)?
I'm not too familiar with the meta-object protocol, but this sounds
like a case where you could make a new metaclass that supports
immutable slot setters. See Section 8.11 in the manual.
- Dave
prev parent reply other threads:[~2017-10-06 12:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 6:00 Goops: Setting Immutible Classes? Christopher Howard
2017-10-06 6:24 ` Mark H Weaver
2017-10-06 15:46 ` Christopher Allan Webber
2017-10-06 12:55 ` Thompson, David [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='CAJ=RwfYS4ZoGrK=xUXL-uzMjbpGO=WS73wo4Cq6oQCd-yKHHRA@mail.gmail.com' \
--to=dthompson2@worcester.edu \
--cc=christopher.howard@qlfiles.net \
--cc=guile-user@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).