From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Pirotte Newsgroups: gmane.lisp.guile.devel Subject: Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a subclass Date: Tue, 27 Jan 2015 17:35:52 -0200 Message-ID: <20150127173552.1d3376bb@capac> References: <20141219174633.6efb845e@capac> <8761btfcni.fsf@pobox.com> <20150126230044.2d1e71de@capac> <87sieweie4.fsf@pobox.com> <20150127171115.6172ccea@capac> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/ke6LkgBdRGAOxepj9wcJvvO"; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1422387378 25792 80.91.229.3 (27 Jan 2015 19:36:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Jan 2015 19:36:18 +0000 (UTC) Cc: guile-devel To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Jan 27 20:36:17 2015 Return-path: Envelope-to: guile-devel@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 1YGBvp-0006AP-NX for guile-devel@m.gmane.org; Tue, 27 Jan 2015 20:36:13 +0100 Original-Received: from localhost ([::1]:49425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGBvo-0001gR-W7 for guile-devel@m.gmane.org; Tue, 27 Jan 2015 14:36:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGBvj-0001g6-Rh for guile-devel@gnu.org; Tue, 27 Jan 2015 14:36:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGBvf-0007Se-IQ for guile-devel@gnu.org; Tue, 27 Jan 2015 14:36:07 -0500 Original-Received: from maximusconfessor.all2all.org ([79.99.200.102]:54110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGBvf-0007SR-CT for guile-devel@gnu.org; Tue, 27 Jan 2015 14:36:03 -0500 Original-Received: from localhost (unknown [192.168.0.2]) by maximusconfessor.all2all.org (Postfix) with ESMTP id 0173BA04C217; Tue, 27 Jan 2015 20:36:02 +0100 (CET) Original-Received: from maximusconfessor.all2all.org ([192.168.0.1]) by localhost (maximusconfessor.all2all.org [192.168.0.2]) (amavisd-new, port 10024) with ESMTP id Fr5uSN091K3v; Tue, 27 Jan 2015 20:35:55 +0100 (CET) Original-Received: from capac (unknown [179.210.41.221]) by maximusconfessor.all2all.org (Postfix) with ESMTPSA id D474AA04C213; Tue, 27 Jan 2015 20:35:54 +0100 (CET) In-Reply-To: <20150127171115.6172ccea@capac> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 79.99.200.102 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:17641 Archived-At: --Sig_/ke6LkgBdRGAOxepj9wcJvvO Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable To be complete, raise the confusion, and allow who would want to follow and test, the setter bug test case I pasted on irc was this one (*): Using guile versions previous to the goops refactoring work Andy did recent= ly, you'd have this answer: scheme@(guile-user)> ,use (oop goops) scheme@(guile-user)> ,use (b) ... scheme@(guile-user)> (set! (!width (make )) 10) $2 =3D 10 scheme@(guile-user)> The expected and correct answer after the refactoring... is ... scheme@(guile-user)> (set! (!width (make )) 10) ;;; ("this is !width setter method, hello!") scheme@(guile-user)>=20 Cheers, David (*) ;; module a.scm starts here (define-module (a) #:use-module (oop goops) #:export ( !width)) (define-class () (width #:accessor !width #:init-keyword #:width #:init-value 0)) (define-method ((setter !width) (self ) width) ;; here comes complex code, computing earth orbit and calling lower ;; level clutter internals, such as the layout... (pk "this is !width setter method, hello!") (slot-set! self 'width width)) ;; module ends here ;; module b.scm starts here (define-module (b) #:use-module (oop goops) #:use-module (a) #:export () #:re-export (!width)) (define-class ()) #;(define-method ((setter !width) (self ) width) (next-method)) ;; module ends here --Sig_/ke6LkgBdRGAOxepj9wcJvvO Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJUx+iYAAoJEPN0/ZOjBXrXQqAH/i1TQcqF8v6WW1VdhP5s5uJO mqYSlys76qdxwX+7Cv0BL6yq7Uo9cB79bRycHTHF1Oe9JTCdnCFmoiQBfOcGTNl9 tIL5CWVLeWMgDZkWgLKwSV7NzFL8ZUupnYE1R/gPKpZE2O1hiySsbY/8RnK23683 xNynnmpvvdcbVuzFDUlxoAoxwZzyfCXCvQsT5YaLMxKfXvJBq1GAIqdOJT1uuVxl 0DrQwQZf+s+tmYqhxErs/OVcvxPC6CUM62QERONL76sQRZNGWg2M6FUX9k5+0hds JX2c0N7Ib1WOVjLVLRXcw0q3xvo2H4HAi/FJBufik0Zu5y6ZXVDF6Zs05ytPcbk= =ULNR -----END PGP SIGNATURE----- --Sig_/ke6LkgBdRGAOxepj9wcJvvO--