From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a subclass Date: Fri, 06 Feb 2015 18:49:24 +0100 Message-ID: <87a90r7wwr.fsf@pobox.com> References: <20141219174633.6efb845e@capac> <8761btfcni.fsf@pobox.com> <20150126230044.2d1e71de@capac> <87sieweie4.fsf@pobox.com> <20150127171115.6172ccea@capac> <87zj94c5rv.fsf@pobox.com> <20150130115015.5c8e3192@capac> <878ugb9nbk.fsf@pobox.com> <20150206150933.09e166f6@capac> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423244981 4419 80.91.229.3 (6 Feb 2015 17:49:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Feb 2015 17:49:41 +0000 (UTC) Cc: guile-devel To: David Pirotte Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Feb 06 18:49:38 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 1YJn29-0002T3-NC for guile-devel@m.gmane.org; Fri, 06 Feb 2015 18:49:37 +0100 Original-Received: from localhost ([::1]:49939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJn29-0004HF-9U for guile-devel@m.gmane.org; Fri, 06 Feb 2015 12:49:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJn25-0004Ff-DB for guile-devel@gnu.org; Fri, 06 Feb 2015 12:49:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJn20-0001LF-Om for guile-devel@gnu.org; Fri, 06 Feb 2015 12:49:33 -0500 Original-Received: from pb-sasl1.int.icgroup.com ([208.72.237.25]:50088 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJn20-0001LA-Ix for guile-devel@gnu.org; Fri, 06 Feb 2015 12:49:28 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id DD20333D3F; Fri, 6 Feb 2015 12:49:27 -0500 (EST) 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=4cG2YNwfauVGiI12+oUH8TkkPbk=; b=oIKmTa EgBsykzGb22IVvfZVEJDxzwgwLGVTLSZgpFPm/xZLA0Ka4XBLnXEXueLmO83GUBP VgeU/gMtHq1tD10QEUtv3Spm4bHHxGjdYrrC7xWGBxpWpZHTWhnF0JBcye8bZMWZ WUHNQNK8HI4jgCbfIKmwpPwwh3RM51fwnkjzE= 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=tE1EQ+a4zCFXkmyjmBlqpvfChsVkcQ9e U7CZlOS/LF+Ip0QPGupzWW3ds7808klhsYqNnP5vovC1rI63UVbXtkvAfbmqcysc BGyuxy+/oZy4uOo/ifsEaRmkwM8ghP8g0F5rw/012bgv1fIhTUul9OMKNkiC6ta7 rPvLXGOafyo= Original-Received: from pb-sasl1.int.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id D4B9933D3E; Fri, 6 Feb 2015 12:49:27 -0500 (EST) 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 091D033D3C; Fri, 6 Feb 2015 12:49:26 -0500 (EST) In-Reply-To: <20150206150933.09e166f6@capac> (David Pirotte's message of "Fri, 6 Feb 2015 15:09:33 -0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Pobox-Relay-ID: 7E7D7E3C-AE28-11E4-B984-B05EFC961345-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-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:17652 Archived-At: Hi :) On Fri 06 Feb 2015 18:09, David Pirotte writes: > (2) I have a different answer from my guile version for the second > part [which I think is the correct answer, maybe you wanted to paste > some other code [?], don't know. Part of my mail described buggy Guile 2.0. Please re-read to be sure, if you have questions :) With the stable-2.0 or master branches, the current behavior is: scheme@(guile-user)> (use-modules (oop goops)) scheme@(guile-user)> (define-class () ... (foo #:getter foo #:init-keyword #:foo)) scheme@(guile-user)> (define-class ()) scheme@(guile-user)> (define obj (make #:foo 34)) scheme@(guile-user)> (define-method (foo (self )) ... (pk "ahoy!") ... (next-method)) scheme@(guile-user)> (pk (foo obj)) ;;; ("ahoy!") ERROR: In procedure scm-error: ERROR: No next method when calling #< foo (2)> with arguments (#< 2c207e0>) Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. scheme@(guile-user) [1]> > In this case indeed, the only method that exists and is applicable is > the getter foo that defines and inherits: there is no > next-method and calling (next-method) would be a user bug, in my > opinion too. So, we should be precise with terminology :) In GOOPS, subclasses do not inherit accessor methods. (There was a bug in which they would; I fixed that.) Each subclass gets its own accessor method defined, if and only if it has the corresponding slot, and that method is not inherited. >> ;;; ("wat!!!") >> >> ;;; (42) >> $2 = 42 > > Here I am confused again: given the above, defining foo on and calling > (next-method) is not different then the foo on , there is no next-method and I > get the error as well, maybe you wanted to paste some other code? Here is what I > get, given the definitions above (*) Here I was describing buggy Guile 2.0 (hence past tense). >> The slot definition protocol in CLOS is different; for example, >> compute-effective-slot-definition in CLOS logically *combines* slot >> definitions with the same name. > > Is it not what goops does as well? I thought so. Nope :) That bit of the protocol was never implemented. Instead the semantics are that the slot from the first entry in the CPL is used. Andy -- http://wingolog.org/