From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Thompson, David" Newsgroups: gmane.lisp.guile.user Subject: Re: Goops: Setting Immutible Classes? Date: Fri, 6 Oct 2017 08:55:53 -0400 Message-ID: References: <1507269654.28034.8.camel@qlfiles.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1507294586 23776 195.159.176.226 (6 Oct 2017 12:56:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 6 Oct 2017 12:56:26 +0000 (UTC) Cc: Guile User Mailing List To: Christopher Howard Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Oct 06 14:56:20 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 1e0SAt-0005Pe-MW for guile-user@m.gmane.org; Fri, 06 Oct 2017 14:56:19 +0200 Original-Received: from localhost ([::1]:44789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0SB1-00012j-4F for guile-user@m.gmane.org; Fri, 06 Oct 2017 08:56:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0SAW-00011e-Kz for guile-user@gnu.org; Fri, 06 Oct 2017 08:55:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0SAV-0005sA-OY for guile-user@gnu.org; Fri, 06 Oct 2017 08:55:56 -0400 Original-Received: from mail-vk0-x234.google.com ([2607:f8b0:400c:c05::234]:56711) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0SAV-0005qt-Iq for guile-user@gnu.org; Fri, 06 Oct 2017 08:55:55 -0400 Original-Received: by mail-vk0-x234.google.com with SMTP id q190so9586472vkd.13 for ; Fri, 06 Oct 2017 05:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2gv75qvsbMVhCPo9aQOnRBvhmOshzL5tlNz5AtAnNYg=; b=w5ygNU7Pgte4JBrKV/nmX3Zm8O9OYr70qBpwZWV/DNLpDt2ReqLOx6pqDterGBMHUK GOU5sdG+7ED3wHBbyU0HEVl5DnW4vxcFhUkC41w6hWx8Wqpj65Yf3Uj43JAUCospkIpn imGWGtJtUse6NUmp+C3LGAnOVBeZyBpx8s9oyDi4IAm5tD/DCTQg8PuNV+xIObjY0UoJ xG2046aCiZMtg1cqQBwhUf50JnOf/JJxebdqSDAHh1krKlvDuA3qR43RGyzhXJ1EPIr1 wfrP1iG13JU1Y4cnPg4hJydCrPdwWGilJPLF5PKyXHvlCcTzpqQMWRDFt4YnQ8Xm/zjV D12g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=2gv75qvsbMVhCPo9aQOnRBvhmOshzL5tlNz5AtAnNYg=; b=XRSldTOL6K9icjCwUIBhG60RMTIVvNKleStcLey7bI54jFOFZRj8DQq+rTi6LEScEA I21/i/mMkBhgpAhaDqBjhWHCy5tWQTa5jGZX7t7q80xsaOMJxq/lqUyQtZHG0ZVi2gB2 6NudC/Seztxp6sLdTvNr6laOR1ncW9dgOby3v7hrLEw0tCjVb0yTfzbU6Gjnt6b6lo5J LmGtBsFoS8cw9X5zEl6IbkNuAuMtmvui52DHFPxKloGVBO6rVPLpX3II7L5iwi2xop8C FNftcjTu+Tr1bKku0NGHxtGpNJp9SGyiRQAPkiUoMVteNCfog275ye9uKzuU7MWa85Yh HqUg== X-Gm-Message-State: AMCzsaVnmDhPfFJ/kwY+lpsgYdNYSbRjbANMfide26d9ikrfIc3fL/Rv HJlUXZtcwm/QYOm478IpKIPsq5xsGAN2zPxrzl06kA== X-Google-Smtp-Source: AOwi7QDWPX4sanx76FoheRGDS0oPDbQe6CiiBJChrv18NTBQOks54uez7tJ+cHrYzqtmJL3TKyzlN8R6UCx5ens9gEA= X-Received: by 10.31.212.1 with SMTP id l1mr803870vkg.50.1507294554350; Fri, 06 Oct 2017 05:55:54 -0700 (PDT) Original-Received: by 10.31.197.4 with HTTP; Fri, 6 Oct 2017 05:55:53 -0700 (PDT) In-Reply-To: <1507269654.28034.8.camel@qlfiles.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400c:c05::234 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:14191 Archived-At: On Fri, Oct 6, 2017 at 2:00 AM, Christopher Howard 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