From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: Re: #:getter procedure returns unexpected value in GOOPS Date: Mon, 09 Mar 2015 22:58:20 +0100 Message-ID: <87a8zlygsj.fsf@pobox.com> References: <87mwf9hu1v.fsf@nebulosa.milkyway> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1425938328 13748 80.91.229.3 (9 Mar 2015 21:58:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Mar 2015 21:58:48 +0000 (UTC) Cc: guile-user@gnu.org To: "Diogo F. S. Ramos" Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Mar 09 22:58:38 2015 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YV5h7-000857-80 for guile-user@m.gmane.org; Mon, 09 Mar 2015 22:58:37 +0100 Original-Received: from localhost ([::1]:45444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YV5h6-00024k-QX for guile-user@m.gmane.org; Mon, 09 Mar 2015 17:58:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YV5gy-00024T-Ee for guile-user@gnu.org; Mon, 09 Mar 2015 17:58:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YV5gv-0002Rn-Oy for guile-user@gnu.org; Mon, 09 Mar 2015 17:58:28 -0400 Original-Received: from pb-sasl1.int.icgroup.com ([208.72.237.25]:52945 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YV5gv-0002Rf-KX for guile-user@gnu.org; Mon, 09 Mar 2015 17:58:25 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id DE16E3EBA3; Mon, 9 Mar 2015 17:58:24 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=D12iNzxWlQ9hnZbRIrLT9ZJ7Zlw=; b=v84oeu xIgXa0H+D2xmdXTJjxBz4jlFetvtZYGso8PYVq1YamvFGxkBYytuKk5XCgQ36IYB +5E4xoV82QYVZa5SJ3X8o0bkDbjqY8ApIMGKMjOYf1yG3jLdutE+brHdMKnBrPxY 0uXzdB8q78XEmDKnffdXln58vnH1Gugj44vxY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=TuShRXCjCaPycWGbaenc33lf/P6Z5h4x P2WB/1UAf7vJECALwuXmZgYkVbZUGeTiZVsBJsIudQ1XjmGuKJynAPDKnR7m5/Qx Ichpu6Ndl6TtTx2tPuZGRaiQmy27GT2O7uAr2iCmdRKPix6TX+9qrnoXygBMhveF /+ok/yxyekQ= Original-Received: from pb-sasl1.int.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id D63573EBA2; Mon, 9 Mar 2015 17:58:24 -0400 (EDT) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 21E703EB9F; Mon, 9 Mar 2015 17:58:23 -0400 (EDT) In-Reply-To: <87mwf9hu1v.fsf@nebulosa.milkyway> (Diogo F. S. Ramos's message of "Fri, 25 Apr 2014 20:24:12 -0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Pobox-Relay-ID: 6882C4C4-C6A7-11E4-923D-B058D0B8C469-02397024!pb-sasl1.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.72.237.25 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 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-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11786 Archived-At: Hi! On Sat 26 Apr 2014 01:24, "Diogo F. S. Ramos" writes: > When using GOOPS, if a class has a second slot, the #:getter procedure > of the first slot returns the value of the second slot when applied to > an instance of a subclass. > > (use-modules (oop goops)) > > (define-class () > (a #:init-form 'foo #:getter foo-a) > (b #:init-form 42)) > > (define-class () > (a #:init-form 'bar)) > > (foo-a (make )) => foo > (foo-a (make )) => 42 > > I expected: > > (foo-a (make )) => bar I realize this is really late :) But since this thread isn't linked to a bug, note that this is now fixed in stable-2.0 and master, to match the behavior in Guile 1.8 and previous, which is actually that: (foo-a (make )) => error! because doesn't just define a different init-value for the slot, it defines a different slot entirely. Andy -- http://wingolog.org/