[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GOOPS functional setter
From: |
tomas |
Subject: |
Re: GOOPS functional setter |
Date: |
Fri, 13 Jan 2017 21:56:46 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----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-----
Re: GOOPS functional setter, Jan Nieuwenhuizen, 2017/01/13