From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.devel Subject: Re: Help required with exporting and using GOOP generics Date: Thu, 14 Mar 2013 20:11:41 -0400 Message-ID: <20130315001141.XJRY9.69640.root@cdptpa-web09-z01> References: <87a9q51wv8.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1363306308 1806 80.91.229.3 (15 Mar 2013 00:11:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Mar 2013 00:11:48 +0000 (UTC) Cc: guile-devel@gnu.org To: Brent Pinkney , Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Mar 15 01:12:13 2013 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 1UGIFn-0004Wg-Si for guile-devel@m.gmane.org; Fri, 15 Mar 2013 01:12:11 +0100 Original-Received: from localhost ([::1]:53092 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGIFR-0005po-8M for guile-devel@m.gmane.org; Thu, 14 Mar 2013 20:11:49 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGIFN-0005pi-Qd for guile-devel@gnu.org; Thu, 14 Mar 2013 20:11:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGIFM-0004JD-AP for guile-devel@gnu.org; Thu, 14 Mar 2013 20:11:45 -0400 Original-Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.120]:54121) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGIFM-0004Iy-5W for guile-devel@gnu.org; Thu, 14 Mar 2013 20:11:44 -0400 Authentication-Results: cdptpa-omtalb.mail.rr.com smtp.user=dsmich@roadrunner.com; auth=pass (LOGIN) X-Authority-Analysis: v=2.0 cv=XNeyuHdE c=1 sm=0 a=82DIuAKQ8J0A:10 a=zTVDa7HKqxcA:10 a=IkcTkHD0fZMA:10 a=doupyKFmAAAA:8 a=Ws6no-_5oXYA:10 a=DeTtaYkFAAAA:8 a=k1vDOUVjXxjnzyKe_gYA:9 a=QEXdDO2ut3YA:10 a=BiDrKXtPeRMA:10 a=UJpe99hltnTXGk3FIeyrjA==:117 X-Cloudmark-Score: 0 X-Authenticated-User: dsmich@roadrunner.com Original-Received: from [10.127.132.100] ([10.127.132.100:61383] helo=cdptpa-web09-z01) by cdptpa-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTPA id F2/1A-04559-D3762415; Fri, 15 Mar 2013 00:11:41 +0000 In-Reply-To: <87a9q51wv8.fsf@tines.lan> X-Priority: 3 (Normal) Sensitivity: Normal X-Originating-IP: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 75.180.132.120 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:15911 Archived-At: ---- Mark H Weaver wrote: > The proper solution is as follows: > > * Every generic function must be defined (using 'define-generic') and > exported from one (and only one) module. > > * Every module that uses a generic function, or adds a method to it (and > that includes slot accessors), must first import the generic function > from the (one) module that exports it. > > Think of a generic function as a normal procedure that contains an > internal table of methods. Like any other procedure, there's a single > module that defines it and exports it. The fact that some modules add > methods to these internal tables does not mean that it is appropriate to > export the procedure from those other modules. Thanks Mark. Very concisely put. -Dale