From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: Making every goops object applicable Date: Tue, 15 May 2012 11:46:57 -0400 Message-ID: <87fwb1e9am.fsf@netris.org> References: <873972l86w.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1337096911 14679 80.91.229.3 (15 May 2012 15:48:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 15 May 2012 15:48:31 +0000 (UTC) Cc: guile-devel@gnu.org To: Krister Svanlund Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue May 15 17:48:30 2012 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 1SUJzA-0007j0-PA for guile-devel@m.gmane.org; Tue, 15 May 2012 17:48:28 +0200 Original-Received: from localhost ([::1]:42910 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUJzA-0001fy-7L for guile-devel@m.gmane.org; Tue, 15 May 2012 11:48:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUJz2-0001dF-KZ for guile-devel@gnu.org; Tue, 15 May 2012 11:48:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUJys-0004eW-SI for guile-devel@gnu.org; Tue, 15 May 2012 11:48:20 -0400 Original-Received: from world.peace.net ([96.39.62.75]:54675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUJys-0004eR-O1 for guile-devel@gnu.org; Tue, 15 May 2012 11:48:10 -0400 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1SUJyl-0006jv-9B; Tue, 15 May 2012 11:48:03 -0400 In-Reply-To: (Krister Svanlund's message of "Tue, 15 May 2012 02:45:37 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 96.39.62.75 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:14435 Archived-At: Krister Svanlund writes: > For example an instance of a class inheriting a class that inherits > that defines 'procedure is not applicable. Looking at the code, it is clear that in order for a GOOPS instance to be applicable, it is not enough for to be a superclass. It is also necessary for the _metaclass_ of its class to have the SCM_VTABLE_FLAG_APPLICABLE_VTABLE bit set. One such metaclass is already built-in: , which is the metaclass for , but if you'd like to define your own metaclass for applicable objects, you can set the bit manually on the metaclass as described by Ludovic. However, keep in mind that the presence of that bit in the metaclass indicates that the first slot of all instances _must_ be the procedure slot. Mark