From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Re: New module system option :duplicates Date: Tue, 11 Mar 2003 11:50:00 +0100 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <878yvrxhp1.fsf@raven.i.defaultvalue.org> <87adg2kbdn.fsf@raven.i.defaultvalue.org> Reply-To: djurfeldt@nada.kth.se NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1047379976 15180 80.91.224.249 (11 Mar 2003 10:52:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 11 Mar 2003 10:52:56 +0000 (UTC) Cc: djurfeldt@nada.kth.se Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Mar 11 11:52:54 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18shNO-0003wa-00 for ; Tue, 11 Mar 2003 11:52:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18shLf-00013K-06 for guile-devel@m.gmane.org; Tue, 11 Mar 2003 05:51:07 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18shLN-0000yg-00 for guile-devel@gnu.org; Tue, 11 Mar 2003 05:50:49 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18shKp-0000N6-00 for guile-devel@gnu.org; Tue, 11 Mar 2003 05:50:20 -0500 Original-Received: from kvast.blakulla.net ([213.212.20.77]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18shKW-0007sP-00 for guile-devel@gnu.org; Tue, 11 Mar 2003 05:49:56 -0500 Original-Received: from barbara.blakulla.net ([213.212.21.238] helo=linnaeus) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 18shKT-0002bI-00; Tue, 11 Mar 2003 11:49:54 +0100 Original-Received: from mdj by linnaeus with local (Exim 3.36 #1 (Debian)) id 18shKc-0004Wo-00; Tue, 11 Mar 2003 11:50:02 +0100 Original-To: Rob Browning In-Reply-To: <87adg2kbdn.fsf@raven.i.defaultvalue.org> (Rob Browning's message of "Mon, 10 Mar 2003 18:14:28 -0600") User-Agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2 Original-cc: guile-devel@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2064 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2064 Rob Browning writes: > Hmm. Though I haven't thought carefully about it yet, that still > feels like somewhat a modularity violation to me. > > Say you have a working module called (math-frob) that defines/uses > some generic-function, say "do-fancy-+", that at the time (foo random) > was designed only had a method for ((x ) (y )) > arguments. > > Then say someone writes module (bar) that defines do-fancy-+ for ((x > ) (y )) arguments, but does it in a way that's not > compatibile with the do-fancy-+ usages in (foo random). If someone > does > > (use-modules (foo random)) > (use-modules (bar)) > > then is (foo random) now broken, and if so, is that to be expected/OK? > i.e. does this just fall under the "well don't do that then" category? I'd like to add to what I wrote in my previous reply that what you describe above is not a new kind of problem introduced by the :merge-generics possibility. Consider the following code which is realizable in old version of Guile and in CLOS: (define-module (baz) :export (do-fancy-+)) (define-generic do-fancy-+) (define-module (foo random) :use-module (baz)) (define-method (do-fancy-+ (x ) (y )) ...) (define-module (bar) :use-module (baz)) (define-method (do-fancy-+ (x ) (y )) ...) The Kiczales paper suggest design principles and a certain disciplin which can be used to avoid these kind of problems. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel