unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Christopher Howard <christopher.howard@qlfiles.net>
To: Guile User Mailing List <guile-user@gnu.org>
Subject: Goops: Setting Immutible Classes?
Date: Thu, 05 Oct 2017 22:00:54 -0800	[thread overview]
Message-ID: <1507269654.28034.8.camel@qlfiles.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 514 bytes --]

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 suppose I could simply use define-method to create setter methods
which create a new instance of the object; but that would get rather
complicated, wouldn't it, if the object had superclasses? So I need
some kind of shallow copy mechanism for the whole object, or a chained
copy mechanism...?

-- 
https://www.debian.org/

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2017-10-06  6:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06  6:00 Christopher Howard [this message]
2017-10-06  6:24 ` Goops: Setting Immutible Classes? Mark H Weaver
2017-10-06 15:46   ` Christopher Allan Webber
2017-10-06 12:55 ` Thompson, David

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=1507269654.28034.8.camel@qlfiles.net \
    --to=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).