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 13:21:10 +0100 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <87ptp3b5ak.fsf@zagadka.ping.de> <87el5jb3gp.fsf@zagadka.ping.de> <87zno7w1xk.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 1047385587 4640 80.91.224.249 (11 Mar 2003 12:26:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 11 Mar 2003 12:26:27 +0000 (UTC) Cc: djurfeldt@nada.kth.se Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Mar 11 13:26:18 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 18sipm-0001Bn-00 for ; Tue, 11 Mar 2003 13:26:18 +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 18sip1-0002vW-07 for guile-devel@m.gmane.org; Tue, 11 Mar 2003 07:25:31 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18sioj-0002sX-00 for guile-devel@gnu.org; Tue, 11 Mar 2003 07:25:13 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18silk-0001dH-00 for guile-devel@gnu.org; Tue, 11 Mar 2003 07:22:08 -0500 Original-Received: from kvast.blakulla.net ([213.212.20.77]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18sikj-00012V-00 for guile-devel@gnu.org; Tue, 11 Mar 2003 07:21:05 -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 18sikg-0002lF-00; Tue, 11 Mar 2003 13:21:02 +0100 Original-Received: from mdj by linnaeus with local (Exim 3.36 #1 (Debian)) id 18siko-0004Z6-00; Tue, 11 Mar 2003 13:21:10 +0100 Original-To: Greg Troxel , Rob Browning , Marius Vollmer , guile-devel@gnu.org, djurfeldt@nada.kth.se In-Reply-To: (Mikael Djurfeldt's message of "Tue, 11 Mar 2003 13:12:02 +0100") User-Agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2 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:2065 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2065 Mikael Djurfeldt writes: > Example: > > An object-oriented graphics package (graphics object) exports the GF > `draw'. So does the pixel-oriented graphics package (graphics paint). > These two packages are developed independently by different developers > but use a common representation of the output device, provided by a > third module. > > Now we're developing a module (graphics object picture) which provides > the class which is a subclass of exported > by (graphics object). Internally, objects store a > from the (graphics paint) module. Therefore (draw picture) internally > calls (draw bitmap). This works, because `draw' in (graphics object > picture) is an which shares methods with draw in > (graphics object) and draw in (graphics paint). > > However, when the X window is redisplayed and all objects need to be > redrawn, the update function in the (graphics object) package calls > `draw' on each on the list of visible objects. This > may include our object, so it is essential that draw in > (graphics object) shares the (draw ) method with draw in > (graphics object picture). Let me add that this is a quite bad example. In the case above, the natural design would be to have the module representing the output device export `draw' and let both (graphics object) and (graphics paint) add their methods on it. Note though, that there are many cases where we can't do that: We are often in the position that we simply want to re-use eisting packages. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel