unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: <tomas@tuxteam.de>
To: guile-user@gnu.org
Subject: Re: GOOPS functional setter
Date: Fri, 13 Jan 2017 21:56:46 +0100	[thread overview]
Message-ID: <20170113205646.GB10416@tuxteam.de> (raw)
In-Reply-To: <871sw6g4je.fsf@dustycloud.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, Jan 13, 2017 at 01:09:57PM -0600, Christopher Allan Webber wrote:
> I guess I never sent this to this list.  Here's a functional setter for
> GOOPS classes.
> 
> Maybe nobody else would use it, but I've used it in a couple of projects
> now, so figure I might as well share.
> 
> This is LGPLv3+.  Feel free to use.
> 
> ==================================================
> 
> ;; By Christopher Allan Webber, LGPLv3+; adapted from shallow-clone in GOOPS
> (use-modules (oop goops))
> 
> (define-method (slot-fset (self <object>) slot-name value)
>   "Return a new copy of SELF, with all slots preserved except SLOT-NAME
> set to VALUE."

(from the peanut gallery)

I understand now what it does, but the name "slot-fset" would confuse the heck
of me. Why not something like "clone" or perhaps "clone*"?

regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlh5Pw4ACgkQBcgs9XrR2kaNewCfSb5g/bMiYZH5ITIgmqm4IIUa
x9gAn33QPd+Bwr5ivPE1t4C/35jX1/ZK
=a0gw
-----END PGP SIGNATURE-----



  reply	other threads:[~2017-01-13 20:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13 19:09 GOOPS functional setter Christopher Allan Webber
2017-01-13 20:56 ` tomas [this message]
2017-01-14  2:11   ` Christopher Allan Webber
2017-01-14 10:08     ` tomas
2017-01-14 17:25       ` Arne Babenhauserheide
2017-01-14 21:16       ` Christopher Allan Webber
2017-01-15  9:31         ` tomas
2017-01-13 21:33 ` Jan Nieuwenhuizen

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=20170113205646.GB10416@tuxteam.de \
    --to=tomas@tuxteam.de \
    --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).