GNU bug report logs - #20423
goops - inheritance of slot options

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guile; Reported by: David Pirotte <david@HIDDEN>; dated Sat, 25 Apr 2015 02:07:01 UTC; Maintainer for guile is bug-guile@HIDDEN.

Message received at 20423 <at> debbugs.gnu.org:


Received: (at 20423) by debbugs.gnu.org; 12 Jul 2016 20:02:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 12 16:02:39 2016
Received: from localhost ([127.0.0.1]:48747 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bN3t9-0006wu-GF
	for submit <at> debbugs.gnu.org; Tue, 12 Jul 2016 16:02:39 -0400
Received: from maximusconfessor.all2all.org ([79.99.200.102]:49595)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <david@HIDDEN>) id 1bN3t7-0006wm-9o
 for 20423 <at> debbugs.gnu.org; Tue, 12 Jul 2016 16:02:38 -0400
Received: from localhost (unknown [192.168.0.2])
 by maximusconfessor.all2all.org (Postfix) with ESMTP id 835C4A04C1AA;
 Tue, 12 Jul 2016 22:02:35 +0200 (CEST)
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 e+wdO7Gl-3oo; Tue, 12 Jul 2016 22:02:30 +0200 (CEST)
Received: from capac (unknown [179.210.32.105])
 by maximusconfessor.all2all.org (Postfix) with ESMTPSA id D779FA04C1B7;
 Tue, 12 Jul 2016 22:02:29 +0200 (CEST)
Date: Tue, 12 Jul 2016 17:02:23 -0300
From: David Pirotte <david@HIDDEN>
To: Andy Wingo <wingo@HIDDEN>
Subject: Re: bug#20423: goops - inheritance of slot options
Message-ID: <20160712170223.7187b651@capac>
In-Reply-To: <87por7jhxw.fsf@HIDDEN>
References: <20150424230538.67db3eaa@capac> <87inwzlkme.fsf@HIDDEN>
 <20160623200857.1e0d3e51@capac> <87por7jhxw.fsf@HIDDEN>
X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/QDdRWnYP5wpKfu0hq7O0IcB"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 20423
Cc: 20423 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--Sig_/QDdRWnYP5wpKfu0hq7O0IcB
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi Andy,

> > It actually is my intention, it has been for years, to study, dig into =
and work
> > on our GOOPS implementation and start to help maintain it ... if I only=
 had more
> > time, I would have done it already.

> > Till then we rely on you =20

> I don't have any time to devote to this, sorry :/

By 'we rely on you', I was referring to maintaining goops, which you do per=
fectly
well, thanks!: but you are maintaining an 'hybrid system' with no design, b=
elieving
it has, but that's not the case.

Personal notes  and an implementation are not, AFAIC, and far from being, a
'design'.  Besides, with all due respect to the person(s) and his/her techn=
ical
abilities, it is obvious to me that he/her/they lack(s) a profound understa=
nding of
the domain, and hence this 'hybrid system' we have now breaks fundamental p=
arts of
the protocol it was [and still is, imo] supposed to follow. It breaks these
fundamental parts of the protocol for no good reason, not a single one, and=
 the
result is an order of magnitude inferior to what it could/should be.

I also strongly believe these issues are actually easy to fix, for you, who
deeply knows the implementation and recently fully reviewed it's source cod=
e, so I
don't believe time is the problem here: we disagree on what Goops was origi=
nally
meant to be and should be, and right now, I failed to convinced you to revi=
sit your
position, in the light of the above, the official design [clos], what Stklo=
s and
early Goops did implement.

Too bad, because it is the right thing to do, for the good of all guilers, =
not just
me: this is why I spend my time still trying to convince you that what we h=
ave is
not good, and this is not good for Guile, imo.

For users, this issue is easy to 'fix': just copy paste the slot def and lo=
cally
change what ever you need to change: 'un pl=C3=A2tre sur une jambe de bois'=
, but at
least it's easy to overcome this current limitation.

Wrt this issue, Stklos and 'early' Goops was following and still should fol=
low this
design:

> [*] A summary of what the clos protocol says:
>
> 	[ this is a copy/paste from a clos tutorial, also pointed by
> 	[ the Stklos reference manual:
>
> 	[	http://www.aiai.ed.ac.uk/~jeff/clos-guide.html#slots
>
> 	When there are superclasses, a subclass can specify a slot that has alre=
ady
> 	been specified for a superclass. When this happens, the information in s=
lot
> 	options has to be combined. For the slot options listed above, either the
> 	option in the subclass overrides the one in the superclass or there is a
> 	union:
>
> 	   :ACCESSOR  -  union
> 	   :INITARG   -  union
> 	   :INITFORM  -  overrides
>
> 	This is what you should expect. The subclass can change the default init=
ial
> 	value by overriding the :initform, and can add to the initargs and
> accessors.
>
> 	However, the union for :accessor is just a consequence of how generic
> 	functions work. If they can apply to instances of a class C, they can al=
so
> 	apply to instances of subclasses of C. (Accessor functions are generic.)=
 =20

Cheers,
And thanks for the hard work anyway!
One day we will agree, I sincerely hope so, for the good of Guile.
David


--Sig_/QDdRWnYP5wpKfu0hq7O0IcB
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXhUzPAAoJEPN0/ZOjBXrXr6QIALZ6vI/21pVDsFFanZN6SZ1u
pxdAf9x/ImcBhwsdTA1S465YT6kTiGqdRugelIY2GZlSSUDtjx6XhGEdP0wMWq94
Z8gV/0Tybr71XNAPceQpm11M6DSkrL88MVl7ii6YbtjkdCV3WYV14E/Q7Ou0XYy+
3qKAQz0nKBImlSFSxJg9EQGV/MTBr3Nt+yNLKPheF8WYPP07G38krDBtM4IAgaxi
MGtwedUp1oYV8zbV/YFyafaUA104uysDyw3oS1VKSIqoe/ej1Ak3eaerrV+9Dr9d
epVVZub3c7eU4KarFLi5Ji5Dg/NGnRP/Xr37lGUyHUPp6Fb8boIy7KndcFcZuwI=
=2dRy
-----END PGP SIGNATURE-----

--Sig_/QDdRWnYP5wpKfu0hq7O0IcB--




Information forwarded to bug-guile@HIDDEN:
bug#20423; Package guile. Full text available.

Message received at 20423 <at> debbugs.gnu.org:


Received: (at 20423) by debbugs.gnu.org; 24 Jun 2016 05:12:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 24 01:12:55 2016
Received: from localhost ([127.0.0.1]:53212 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bGJQF-00051U-Jt
	for submit <at> debbugs.gnu.org; Fri, 24 Jun 2016 01:12:55 -0400
Received: from pb-sasl1.pobox.com ([64.147.108.66]:63323
 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <wingo@HIDDEN>) id 1bGJQD-00051M-90
 for 20423 <at> debbugs.gnu.org; Fri, 24 Jun 2016 01:12:53 -0400
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1])
 by pb-sasl1.pobox.com (Postfix) with ESMTP id 2473C26DC2;
 Fri, 24 Jun 2016 01:12:53 -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=uE0U2XhN5/4oCVIwBZPhhBLRoFU=; b=s/qHe/
 +A4DsU90vM6GV/Vv4a1ugMh7tEOcF3L+viGHqqpWGF6/mZGyeuLPoXM2zyxv6gdM
 hkx2yMVVW3qSLelkQyWdwXlMmcZkO4wfzWiWYTanHOfkhL52agSSdQ6FnRYQpQS1
 /sewEkfR2Www/r88GW4RBbnDPhBn1iNlBB6pQ=
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=iZxpLKYLWB1bYGs4EktCS7QVbaCzRNwv
 VjJLz//oojRZIdYQYoYQpIZB58VI9BPOXoxRs8H5Nonu+QybBt20PeuwjAFs+UeF
 U5J/fy3PbK8gSg94cU+r9XL6P9Hx1m3ilCj+tMSmOyjr+/Fb363cFQl2H4Nxe2Ep
 q/8wENX2bp0=
Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1])
 by pb-sasl1.pobox.com (Postfix) with ESMTP id 1D50026DC1;
 Fri, 24 Jun 2016 01:12:53 -0400 (EDT)
Received: from clucks (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 5A45326DC0;
 Fri, 24 Jun 2016 01:12:52 -0400 (EDT)
From: Andy Wingo <wingo@HIDDEN>
To: David Pirotte <david@HIDDEN>
Subject: Re: bug#20423: goops - inheritance of slot options
References: <20150424230538.67db3eaa@capac> <87inwzlkme.fsf@HIDDEN>
 <20160623200857.1e0d3e51@capac>
Date: Fri, 24 Jun 2016 07:04:43 +0200
In-Reply-To: <20160623200857.1e0d3e51@capac> (David Pirotte's message of "Thu, 
 23 Jun 2016 20:08:57 -0300")
Message-ID: <87por7jhxw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Pobox-Relay-ID: 4D5D38EA-39CA-11E6-8969-C1836462E9F6-02397024!pb-sasl1.pobox.com
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: 20423
Cc: 20423 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

Hi,

On Fri 24 Jun 2016 01:08, David Pirotte <david@HIDDEN> writes:

> It actually is my intention, it has been for years, to study, dig into and work on
> our GOOPS implementation and start to help maintain it ... if I only had more time,
> I would have done it already.
>
> Till then we rely on you

I don't have any time to devote to this, sorry :/

Regards,

Andy




Information forwarded to bug-guile@HIDDEN:
bug#20423; Package guile. Full text available.

Message received at 20423 <at> debbugs.gnu.org:


Received: (at 20423) by debbugs.gnu.org; 24 Jun 2016 05:12:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 24 01:12:52 2016
Received: from localhost ([127.0.0.1]:53209 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bGJQC-00051E-Cf
	for submit <at> debbugs.gnu.org; Fri, 24 Jun 2016 01:12:52 -0400
Received: from pb-sasl1.pobox.com ([64.147.108.66]:63034
 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <wingo@HIDDEN>) id 1bGJQA-000516-B6
 for 20423 <at> debbugs.gnu.org; Fri, 24 Jun 2016 01:12:50 -0400
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1])
 by pb-sasl1.pobox.com (Postfix) with ESMTP id A810026DBD;
 Fri, 24 Jun 2016 01:12:48 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc
 :subject:in-reply-to:references:date:message-id:mime-version
 :content-type; s=sasl; bh=uE0U2XhN5/4oCVIwBZPhhBLRoFU=; b=YyWJiy
 X6moHoIO+4r6R5b7yB5+TOkk0xEKeMsSOIGgXSDOSJlhnhfWM0YvAHlVYKD6TYrA
 Aszbj/1cOlibsfA2Lw0ah5x/Aq5GFi90vwkIkpNMLY0QpewbSYHMTpPxblakMcBy
 kAvSNfymZwU6+NJQlO6nBaOEXuZwKTx1xgl64=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc
 :subject:in-reply-to:references:date:message-id:mime-version
 :content-type; q=dns; s=sasl; b=aSjaO3xwUxR9JCXShAIswT0nN6uwNSvk
 RUJU9yXfLApSmZYIgRBVrdYJ2kZX3iEUrDjV5Dy65XHdGoGJ4sZI1V1fwhjOOfNn
 G0STDhqx3su49ruHgOPCY9+GQMbph4HWXTdoP1okL0iHPz3wgBK+IFjf5ILTdyQE
 h/G2ffxLK0g=
Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1])
 by pb-sasl1.pobox.com (Postfix) with ESMTP id 8E36126DBB;
 Fri, 24 Jun 2016 01:12:48 -0400 (EDT)
Received: from clucks (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 92D5D26DBA;
 Fri, 24 Jun 2016 01:12:47 -0400 (EDT)
From: Andy Wingo <wingo@HIDDEN>
To: David Pirotte <david@HIDDEN>
Subject: Re: bug#20423: goops - inheritance of slot options
In-Reply-To: <20160623200857.1e0d3e51@capac> (David Pirotte's message of "Thu, 
 23 Jun 2016 20:08:57 -0300")
References: <20150424230538.67db3eaa@capac> <87inwzlkme.fsf@HIDDEN>
 <20160623200857.1e0d3e51@capac>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
Date: Fri, 24 Jun 2016 07:12:39 +0200
Message-ID: <87oa6rjhko.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Pobox-Relay-ID: 4A96E426-39CA-11E6-912A-C1836462E9F6-02397024!pb-sasl1.pobox.com
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: 20423
Cc: 20423 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

Hi,

On Fri 24 Jun 2016 01:08, David Pirotte <david@HIDDEN> writes:

> It actually is my intention, it has been for years, to study, dig into and work on
> our GOOPS implementation and start to help maintain it ... if I only had more time,
> I would have done it already.
>
> Till then we rely on you

I don't have any time to devote to this, sorry :/

Regards,

Andy




Information forwarded to bug-guile@HIDDEN:
bug#20423; Package guile. Full text available.

Message received at 20423 <at> debbugs.gnu.org:


Received: (at 20423) by debbugs.gnu.org; 24 Jun 2016 01:06:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 23 21:06:46 2016
Received: from localhost ([127.0.0.1]:53149 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bGFa1-0007PO-Qn
	for submit <at> debbugs.gnu.org; Thu, 23 Jun 2016 21:06:46 -0400
Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.228]:17492
 helo=cdptpa-oedge-vip.email.rr.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dsmich@HIDDEN>) id 1bGFZz-0007P9-63
 for 20423 <at> debbugs.gnu.org; Thu, 23 Jun 2016 21:06:44 -0400
Authentication-Results: cdptpa-oedge03 smtp.user=dsmich@HIDDEN;
 auth=pass (LOGIN)
Received: from [107.14.174.248] ([107.14.174.248:59546] helo=cdptpa-web03)
 by cdptpa-oedge03 (envelope-from <dsmich@HIDDEN>)
 (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTPA
 id A2/67-30907-C978C675; Fri, 24 Jun 2016 01:06:36 +0000
Message-ID: <20160624010636.CPEPG.255078.root@cdptpa-web03>
Date: Thu, 23 Jun 2016 21:06:36 -0400
From: <dsmich@HIDDEN>
To: David Pirotte <david@HIDDEN>, Andy Wingo <wingo@HIDDEN>
Subject: Re: bug#20423: goops - inheritance of slot options
In-Reply-To: <20160623200857.1e0d3e51@capac>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
Sensitivity: Normal
X-Originating-IP: from 65.185.85.154 by webmail.roadrunner.com;
 Fri, 24 Jun 2016 1:06:36 +0000
X-RR-Connecting-IP: 107.14.168.142:2525
X-Cloudmark-Score: 0
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 20423
Cc: 20423 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)


---- David Pirotte <david@HIDDEN> wrote: 
> Hi Andy,
> 
> > For what it's worth this is a part of GOOPS's design AFAIU: all slot
> > definitions are unique.  Two slots named S declared on classes A and B
> > are distinct, even if A is a superclass of B.
> 
> Well, as I explained in the original report, the only specification we have is CLOS:
> Stklos, upon which Guile GOOPS is based, clearly state in its manual, among the
> first paragraphs, that it implements the CLOS protocol [a subset]: there is no
> 'redesign' anywhere in Stlkos [it just lacks :before and :after methods AFAICT].
> 
> AFAICT, there is no Guile 'official' document stating clearly, neither in the
> manual, that GOOPS authors decided to redesign this part of the protocol and why...
> is there?

Way way back, goops was a separate project from guile.   This TODO file has some info on where Mikael was planning on going with it:

http://cvs.savannah.gnu.org/viewvc/guile/guile-oops/TODO?revision=1.19&root=guile&view=markup

-Dale





Information forwarded to bug-guile@HIDDEN:
bug#20423; Package guile. Full text available.

Message received at 20423 <at> debbugs.gnu.org:


Received: (at 20423) by debbugs.gnu.org; 23 Jun 2016 23:09:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 23 19:09:20 2016
Received: from localhost ([127.0.0.1]:53118 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bGDkO-000323-Fa
	for submit <at> debbugs.gnu.org; Thu, 23 Jun 2016 19:09:20 -0400
Received: from maximusconfessor.all2all.org ([79.99.200.102]:58255)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <david@HIDDEN>) id 1bGDkM-00031u-DW
 for 20423 <at> debbugs.gnu.org; Thu, 23 Jun 2016 19:09:19 -0400
Received: from localhost (unknown [192.168.0.2])
 by maximusconfessor.all2all.org (Postfix) with ESMTP id 95D98A04C0E0;
 Fri, 24 Jun 2016 01:09:16 +0200 (CEST)
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 IY0r8rrFyT5y; Fri, 24 Jun 2016 01:09:11 +0200 (CEST)
Received: from capac (unknown [179.210.35.216])
 by maximusconfessor.all2all.org (Postfix) with ESMTPSA id DB1EBA04C00F;
 Fri, 24 Jun 2016 01:09:10 +0200 (CEST)
Date: Thu, 23 Jun 2016 20:08:57 -0300
From: David Pirotte <david@HIDDEN>
To: Andy Wingo <wingo@HIDDEN>
Subject: Re: bug#20423: goops - inheritance of slot options
Message-ID: <20160623200857.1e0d3e51@capac>
In-Reply-To: <87inwzlkme.fsf@HIDDEN>
References: <20150424230538.67db3eaa@capac>
	<87inwzlkme.fsf@HIDDEN>
X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/t9T3.iBt1ARxg4B489x+ZLt"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 20423
Cc: 20423 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--Sig_/t9T3.iBt1ARxg4B489x+ZLt
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi Andy,

> For what it's worth this is a part of GOOPS's design AFAIU: all slot
> definitions are unique.  Two slots named S declared on classes A and B
> are distinct, even if A is a superclass of B.

Well, as I explained in the original report, the only specification we have=
 is CLOS:
Stklos, upon which Guile GOOPS is based, clearly state in its manual, among=
 the
first paragraphs, that it implements the CLOS protocol [a subset]: there is=
 no
'redesign' anywhere in Stlkos [it just lacks :before and :after methods AFA=
ICT].

AFAICT, there is no Guile 'official' document stating clearly, neither in t=
he
manual, that GOOPS authors decided to redesign this part of the protocol an=
d why...
is there?

It seems to me, in this rather unfortunate case, that you take for a 'desig=
n' or a
'redesign', what was actually a great implementation to start with, no doub=
t, but
which has these bugs, implementation bugs, not design decisions.

> I don't know if we can change this.  I guess maybe.  There would have to
> be a design though.  I guess fleshing out the `compute-slots' protocol
> from http://www.alu.org/mop/concepts.html#class-finalization-protocol
> would be the thing.

Not sure what you mean by 'we can't change this', but I hope/think it can b=
e fixed,
technically I don't see what could prevent this to be done since Stklos doe=
s the
right thing... [I'm pretty sure gauche does the right thing too, and in any=
 case,
all CLOS implementation do]. Maybe you are referring to some C part of the =
code I'm
not aware of that would effectively prevent a fix, don't know...

> I believe that technically you can already provide your own
> `compute-slots' implementation, but you are probably missing some
> definitions that would help you do so in a compatible manner.  Check it
> out for yourself and give it a go, no need to wait on Guile people :)

	Right: if you want it right do it yourself ... :)=20

It actually is my intention, it has been for years, to study, dig into and =
work on
our GOOPS implementation and start to help maintain it ... if I only had mo=
re time,
I would have done it already.

Till then we rely on you, And even though I could do it 'right now' we'd st=
ill have,
unless selfish my own implementation in my little corner, still have to agr=
ee upon
the design reference document(s) GOOPS has been/should be based  upon:

	and I want GOOPS to follow the CLOS protocol, for its entire subset, not j=
ust
	for me, but any Guilers, and especially the one that will learn oop using
	GOOPS;

	the above, especially for getters, setters, accessors inheritance _and_ th=
is
	bug, slot redefinition.

So, rather then being a technical problem, we strongly disagree, unfortunat=
ely, on
what GOOPS protocol should implement, don't you think it would be better to=
 follow
the CLOS protocol?

	Could you list what you consider a win, for humanity :), in blocking slot
	option redefinition and inheritance to be blocked?

	Could we talk to the original GOOPS author, and if so, would you be
	convinced, if he confirms of course, that all these are bugs and not design
	decisions?

All this said, I wonder, before I start :), if the still C part of the code=
 would
prevent me to patch GOOPS so it fully respect the CLOS protocol?

Thanks,
David

--Sig_/t9T3.iBt1ARxg4B489x+ZLt
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXbGwJAAoJEPN0/ZOjBXrXXOQIAJzkhlzPVRvkFbty7E8u7fcY
Sy7dnqKxpMJUPnxH478Sc5z68NbEi9tWS9QznSm8cskaIPGZaUMtxB7ovFpa0wUA
GRo4WCqQWvKF49glthu48VGC5DkPNkLZfbsCS70RqbE4APmTdD5w+wzHACcvVo6F
6sXqIVX6a3DikYRtNQl2D7BEwSgqF1Ig5xXQQFiO9PgQ1qJUbQqYG30wFybhMiA7
fs9r8Iuyja/2o22zFXqyCx4Wr1mZoTIp16epYF08kkdaOTTo5+Q6WVqhVl3FJ19U
Tu+7qaggcWc/bXLnPIYJT0/8ARQvGNROPZlzG1UMDufNVQVe0OwGPfSoe4H2BGQ=
=nCDC
-----END PGP SIGNATURE-----

--Sig_/t9T3.iBt1ARxg4B489x+ZLt--




Information forwarded to bug-guile@HIDDEN:
bug#20423; Package guile. Full text available.

Message received at 20423 <at> debbugs.gnu.org:


Received: (at 20423) by debbugs.gnu.org; 23 Jun 2016 20:24:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 23 16:24:09 2016
Received: from localhost ([127.0.0.1]:53025 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bGBAX-0005nI-5F
	for submit <at> debbugs.gnu.org; Thu, 23 Jun 2016 16:24:09 -0400
Received: from pb-sasl2.pobox.com ([64.147.108.67]:63080
 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <wingo@HIDDEN>) id 1bGBAV-0005n9-Lr
 for 20423 <at> debbugs.gnu.org; Thu, 23 Jun 2016 16:24:08 -0400
Received: from sasl.smtp.pobox.com (unknown [127.0.0.1])
 by pb-sasl2.pobox.com (Postfix) with ESMTP id 6349C246CD;
 Thu, 23 Jun 2016 16:24:05 -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=flcVKktTwk+Ze12pM/OgANTyOVg=; b=U4+v+5
 SiLPtFXKUuk7md1A4ZenkNdj4q97yYUdCqY2cnUTTGu97OfFZRPIZSYat0j5P15F
 hJi+cID7sduCAZWw1deAlpG+6BeTjM1lg57NPE3R8jUa/kr++2UmCyqOEBXh7gQl
 TjYZXB2kH6T9bYQcL0J2BL+7c839mbhghZMOw=
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=iq/mUW+gKRpxWjGaDyay3ZPntMXX4CTt
 7/T0WTQZtq3bvUQG2+lLp2Wfpgr5zjFWtVjIybyy1UD0PGWaXix38e6ABumET837
 KHMFT5fyRsrMPQP/1EBM9TBJnzagRMMsCRV9KRJcFWZRVNJ4B9b+t0V0V801ksBQ
 9Huj11EFeGQ=
Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1])
 by pb-sasl2.pobox.com (Postfix) with ESMTP id 5D06F246CC;
 Thu, 23 Jun 2016 16:24:05 -0400 (EDT)
Received: from clucks (unknown [88.160.190.192])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by pb-sasl2.pobox.com (Postfix) with ESMTPSA id 0FBD0246CB;
 Thu, 23 Jun 2016 16:24:03 -0400 (EDT)
From: Andy Wingo <wingo@HIDDEN>
To: David Pirotte <david@HIDDEN>
Subject: Re: bug#20423: goops - inheritance of slot options
References: <20150424230538.67db3eaa@capac>
Date: Thu, 23 Jun 2016 22:23:53 +0200
In-Reply-To: <20150424230538.67db3eaa@capac> (David Pirotte's message of "Fri, 
 24 Apr 2015 23:05:38 -0300")
Message-ID: <87inwzlkme.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Pobox-Relay-ID: 6DE92CEE-3980-11E6-9604-28A6F1301B6D-02397024!pb-sasl2.pobox.com
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: 20423
Cc: 20423 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.4 (-)

Hi,

For what it's worth this is a part of GOOPS's design AFAIU: all slot
definitions are unique.  Two slots named S declared on classes A and B
are distinct, even if A is a superclass of B.

I don't know if we can change this.  I guess maybe.  There would have to
be a design though.  I guess fleshing out the `compute-slots' protocol
from http://www.alu.org/mop/concepts.html#class-finalization-protocol
would be the thing.

I believe that technically you can already provide your own
`compute-slots' implementation, but you are probably missing some
definitions that would help you do so in a compatible manner.  Check it
out for yourself and give it a go, no need to wait on Guile people :)

Andy

On Sat 25 Apr 2015 04:05, David Pirotte <david@HIDDEN> writes:

> Hello,
>
> 	GNU Guile 2.0.11.114-649ec
> 	goops - inheritance of slot options
> 	severity - serious
>
> The current goops implementation breaks the [clos] protocol [*] for inheritance of
> slot options.  This is a serious bug.
>
> Below, [A] what stklos does, [B] what goops does, [*] a summary of what the clos
> protocol says wrt  inheritance of slot options.
>
> Cheers,
> David
>
>
> [A]	Here is what stklos does:
>
> 	stklos/subclass-slot-redefinition.scm
>
> (define-class <person> ()
>   ((name :accessor name :init-keyword :name :init-form "")
>    (age :accessor age :init-keyword :age :init-form -1)))
>
> (define-class <teacher> (<person>)
>   ((subject :accessor subject :init-keyword :subject :init-form "")))
>
> (define-class <maths-teacher> (<teacher>)
>   ((subject :init-form "Mathematics")))
>
> david@capac:~/alto/projects/stklos 15 $ stklos
> *   STklos version 1.10
>  *  Copyright (C) 1999-2011 Erick Gallesio - Universite de Nice <eg@HIDDEN>
> * * [Linux-3.16.0-4-amd64-x86_64/pthread/readline/utf8]
> stklos> (load "subclass-slot-redefinition.scm")
> stklos> (define p2 (make <maths-teacher> :name 'john :age 34))
> ;; p2
> stklos> (describe p2)
> #[<maths-teacher> 28a2420] is an an instance of class <maths-teacher>.
> Slots are: 
>      age = 34
>      name = john
>      subject = "Mathematics"
> stklos> (subject p2)
> "Mathematics"
> stklos> 
>
>
> [B]	Here is what goops does:
>
> 	goops/subclass-slot-redefinition.scm
>
> (use-modules (oop goops))
>
> (define-class <person> ()
>   (name #:accessor name #:init-keyword #:name #:init-form "")
>   (age #:accessor age #:init-keyword #:age #:init-form -1))
>
> (define-class <teacher> (<person>)
>   (subject #:accessor subject #:init-keyword #:subject #:init-form ""))
>
> (define-class <maths-teacher> (<teacher>)
>   (subject #:init-form "Mathematics"))
>
> david@capac:~/alto/projects/guile-tests/goops 51 $ guile
> GNU Guile 2.0.11.114-649ec
> Copyright (C) 1995-2014 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)> (load "subclass-slot-redefinition.scm")
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;;       or pass the --no-auto-compile argument to disable.
> ;;; compiling /usr/alto/projects/guile-tests/goops/subclass-slot-redefinition.scm
> ;;;
> compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/usr/alto/projects/guile-tests/goops/subclass-slot-redefinition.scm.go
> scheme@(guile-user)> (define p2 (make <maths-teacher> #:name 'john #:age 34))
> scheme@(guile-user)> ,use (oop goops describe) scheme@(guile-user)> (describe p2)
> #<<maths-teacher> 1432300> is an instance of class <maths-teacher>
> Slots are: 
>      name = john
>      age = 34
>      subject = "Mathematics"
> scheme@(guile-user)> (subject p2)
> ERROR: In procedure scm-error:
> ERROR: No applicable method for #<<accessor> subject (1)> in call (subject
> #<<maths-teacher> 1432300>)
>
> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
> scheme@(guile-user) [1]> 
>
>
> [*] A summary of what the clos protocol says:
>
> 	[ this is a copy/paste from a clos tutorial, also pointed by
> 	[ the Stklos reference manual:
>
> 	[	http://www.aiai.ed.ac.uk/~jeff/clos-guide.html#slots
>
> 	When there are superclasses, a subclass can specify a slot that has already
> 	been specified for a superclass. When this happens, the information in slot
> 	options has to be combined. For the slot options listed above, either the
> 	option in the subclass overrides the one in the superclass or there is a
> 	union:
>
> 	   :ACCESSOR  -  union
> 	   :INITARG   -  union
> 	   :INITFORM  -  overrides
>
> 	This is what you should expect. The subclass can change the default initial
> 	value by overriding the :initform, and can add to the initargs and accessors.
>
> 	However, the union for :accessor is just a consequence of how generic
> 	functions work. If they can apply to instances of a class C, they can also
> 	apply to instances of subclasses of C. (Accessor functions are generic.)




Information forwarded to bug-guile@HIDDEN:
bug#20423; Package guile. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 25 Apr 2015 02:06:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 24 22:06:31 2015
Received: from localhost ([127.0.0.1]:39095 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1YlpUE-0008Il-MS
	for submit <at> debbugs.gnu.org; Fri, 24 Apr 2015 22:06:31 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38070)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <david@HIDDEN>) id 1YlpUD-0008IY-1E
 for submit <at> debbugs.gnu.org; Fri, 24 Apr 2015 22:06:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <david@HIDDEN>) id 1YlpU6-0004Qj-AB
 for submit <at> debbugs.gnu.org; Fri, 24 Apr 2015 22:06:23 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,
 T_FILL_THIS_FORM_SHORT autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:46612)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <david@HIDDEN>) id 1YlpU6-0004Qa-7a
 for submit <at> debbugs.gnu.org; Fri, 24 Apr 2015 22:06:22 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51572)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <david@HIDDEN>) id 1YlpU4-0001n2-H4
 for bug-guile@HIDDEN; Fri, 24 Apr 2015 22:06:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <david@HIDDEN>) id 1YlpTv-0004Oy-F2
 for bug-guile@HIDDEN; Fri, 24 Apr 2015 22:06:20 -0400
Received: from maximusconfessor.all2all.org ([79.99.200.102]:40055)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <david@HIDDEN>) id 1YlpTv-0004NJ-71
 for bug-guile@HIDDEN; Fri, 24 Apr 2015 22:06:11 -0400
Received: from localhost (unknown [192.168.0.2])
 by maximusconfessor.all2all.org (Postfix) with ESMTP id 49B77A04C173
 for <bug-guile@HIDDEN>; Sat, 25 Apr 2015 04:05:49 +0200 (CEST)
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 6QplZDNyBToj for <bug-guile@HIDDEN>;
 Sat, 25 Apr 2015 04:05:42 +0200 (CEST)
Received: from capac (unknown [179.210.41.179])
 by maximusconfessor.all2all.org (Postfix) with ESMTPSA id A7E9EA04C0EF
 for <bug-guile@HIDDEN>; Sat, 25 Apr 2015 04:05:41 +0200 (CEST)
Date: Fri, 24 Apr 2015 23:05:38 -0300
From: David Pirotte <david@HIDDEN>
To: <bug-guile@HIDDEN>
Subject: goops - inheritance of slot options
Message-ID: <20150424230538.67db3eaa@capac>
X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 boundary="Sig_/lxcRwVD_+dtKi_IpLWz6/YA"; protocol="application/pgp-signature"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

--Sig_/lxcRwVD_+dtKi_IpLWz6/YA
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hello,

	GNU Guile 2.0.11.114-649ec
	goops - inheritance of slot options
	severity - serious

The current goops implementation breaks the [clos] protocol [*] for inherit=
ance of
slot options.  This is a serious bug.

Below, [A] what stklos does, [B] what goops does, [*] a summary of what the=
 clos
protocol says wrt  inheritance of slot options.

Cheers,
David


[A]	Here is what stklos does:

	stklos/subclass-slot-redefinition.scm

--8<---------------cut here---------------start------------->8---
(define-class <person> ()
  ((name :accessor name :init-keyword :name :init-form "")
   (age :accessor age :init-keyword :age :init-form -1)))

(define-class <teacher> (<person>)
  ((subject :accessor subject :init-keyword :subject :init-form "")))

(define-class <maths-teacher> (<teacher>)
  ((subject :init-form "Mathematics")))
--8<---------------cut here---------------end-------------->8---

david@capac:~/alto/projects/stklos 15 $ stklos
*   STklos version 1.10
 *  Copyright (C) 1999-2011 Erick Gallesio - Universite de Nice <eg@HIDDEN=
r>
* * [Linux-3.16.0-4-amd64-x86_64/pthread/readline/utf8]
stklos> (load "subclass-slot-redefinition.scm")
stklos> (define p2 (make <maths-teacher> :name 'john :age 34))
;; p2
stklos> (describe p2)
#[<maths-teacher> 28a2420] is an an instance of class <maths-teacher>.
Slots are:=20
     age =3D 34
     name =3D john
     subject =3D "Mathematics"
stklos> (subject p2)
"Mathematics"
stklos>=20


[B]	Here is what goops does:

	goops/subclass-slot-redefinition.scm

--8<---------------cut here---------------start------------->8---
(use-modules (oop goops))

(define-class <person> ()
  (name #:accessor name #:init-keyword #:name #:init-form "")
  (age #:accessor age #:init-keyword #:age #:init-form -1))

(define-class <teacher> (<person>)
  (subject #:accessor subject #:init-keyword #:subject #:init-form ""))

(define-class <maths-teacher> (<teacher>)
  (subject #:init-form "Mathematics"))
--8<---------------cut here---------------end-------------->8---

david@capac:~/alto/projects/guile-tests/goops 51 $ guile
GNU Guile 2.0.11.114-649ec
Copyright (C) 1995-2014 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (load "subclass-slot-redefinition.scm")
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /usr/alto/projects/guile-tests/goops/subclass-slot-redefiniti=
on.scm
;;;
compiled /home/david/.cache/guile/ccache/2.0-LE-8-2.0/usr/alto/projects/gui=
le-tests/goops/subclass-slot-redefinition.scm.go
scheme@(guile-user)> (define p2 (make <maths-teacher> #:name 'john #:age 34=
))
scheme@(guile-user)> ,use (oop goops describe) scheme@(guile-user)> (descri=
be p2)
#<<maths-teacher> 1432300> is an instance of class <maths-teacher>
Slots are:=20
     name =3D john
     age =3D 34
     subject =3D "Mathematics"
scheme@(guile-user)> (subject p2)
ERROR: In procedure scm-error:
ERROR: No applicable method for #<<accessor> subject (1)> in call (subject
#<<maths-teacher> 1432300>)

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]>=20


[*] A summary of what the clos protocol says:

	[ this is a copy/paste from a clos tutorial, also pointed by
	[ the Stklos reference manual:

	[	http://www.aiai.ed.ac.uk/~jeff/clos-guide.html#slots

	When there are superclasses, a subclass can specify a slot that has already
	been specified for a superclass. When this happens, the information in slot
	options has to be combined. For the slot options listed above, either the
	option in the subclass overrides the one in the superclass or there is a
	union:

	   :ACCESSOR  -  union
	   :INITARG   -  union
	   :INITFORM  -  overrides

	This is what you should expect. The subclass can change the default initial
	value by overriding the :initform, and can add to the initargs and accesso=
rs.

	However, the union for :accessor is just a consequence of how generic
	functions work. If they can apply to instances of a class C, they can also
	apply to instances of subclasses of C. (Accessor functions are generic.)

--Sig_/lxcRwVD_+dtKi_IpLWz6/YA
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJVOvZyAAoJEPN0/ZOjBXrXe/EIAKl/G54SyQNgWSC2ClE0nTvK
W/IONbSCKicD1aqKlXsBuvQCHF4YGpyxlfBO0Dg9buR/THcY70Tii5mYQjo1C6IT
VFEirJDoZjxpR9Nu+4fdaY8NF4eEYMiC6dWA23gWr5MyhoxM86tHu70F0Q7PRI0K
4HGklopZD68wPw0G5yFGtaNe4h+hY8I/H5TBBk7O3ZD44TUwrwm4krp8b6+ZYsqk
EzRPegu8csbLUAgxwsRoF2VEYASPWriMvabBFajCk8kqJ+EvgD9GxEl4pgXsdQfH
4CeLhCz2vmne1pneAXIFV3Phz8QsMPxuxIGwyTDZ3TPZbdRim+RvAJwX5HRm0ck=
=CF3n
-----END PGP SIGNATURE-----

--Sig_/lxcRwVD_+dtKi_IpLWz6/YA--




Acknowledgement sent to David Pirotte <david@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guile@HIDDEN. Full text available.
Report forwarded to bug-guile@HIDDEN:
bug#20423; Package guile. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.