From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Newsgroups: gmane.lisp.guile.user Subject: Re: GOOPS functional setter Date: Fri, 13 Jan 2017 21:56:46 +0100 Message-ID: <20170113205646.GB10416@tuxteam.de> References: <871sw6g4je.fsf@dustycloud.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1484341797 31485 195.159.176.226 (13 Jan 2017 21:09:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Jan 2017 21:09:57 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Jan 13 22:09:54 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cS96f-0007m9-7a for guile-user@m.gmane.org; Fri, 13 Jan 2017 22:09:53 +0100 Original-Received: from localhost ([::1]:45274 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cS96j-0000Xc-Iy for guile-user@m.gmane.org; Fri, 13 Jan 2017 16:09:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cS8u4-0005nR-9Y for guile-user@gnu.org; Fri, 13 Jan 2017 15:56:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cS8u1-0006S0-8q for guile-user@gnu.org; Fri, 13 Jan 2017 15:56:52 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:42798 helo=tomasium.tuxteam.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cS8u1-0006RG-2B for guile-user@gnu.org; Fri, 13 Jan 2017 15:56:49 -0500 Original-Received: from tomas by tomasium.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1cS8ty-00037W-6J for guile-user@gnu.org; Fri, 13 Jan 2017 21:56:46 +0100 In-Reply-To: <871sw6g4je.fsf@dustycloud.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 5.199.139.25 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13096 Archived-At: -----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 ) 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-----