From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marko Rauhamaa Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.user Subject: Re: anyone define port types? Date: Wed, 30 Mar 2016 23:07:10 +0300 Message-ID: <87shz7vifl.fsf@elektro.pacujo.net> References: <87y492mnjp.fsf@pobox.com> <87io046wp7.fsf@drakenvlieg.flower> <87a8lfx37i.fsf@elektro.pacujo.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459368444 23888 80.91.229.3 (30 Mar 2016 20:07:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Mar 2016 20:07:24 +0000 (UTC) Cc: Andy Wingo , "guile-user@gnu.org" , guile-devel To: Jan Wedekind Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Mar 30 22:07:24 2016 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 1alMOe-0000Cz-SH for guile-devel@m.gmane.org; Wed, 30 Mar 2016 22:07:20 +0200 Original-Received: from localhost ([::1]:56565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alMOd-0001UK-Fj for guile-devel@m.gmane.org; Wed, 30 Mar 2016 16:07:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alMOZ-0001QJ-O1 for guile-devel@gnu.org; Wed, 30 Mar 2016 16:07:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alMOY-0003wY-OB for guile-devel@gnu.org; Wed, 30 Mar 2016 16:07:15 -0400 Original-Received: from [2001:1bc8:1a0:5384:7a2b:cbff:fe9f:e508] (port=36678 helo=pacujo.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alMOW-0003qT-3D; Wed, 30 Mar 2016 16:07:12 -0400 Original-Received: from elektro.pacujo.net (192.168.1.200) by elektro.pacujo.net; Wed, 30 Mar 2016 23:07:10 +0300 Original-Received: by elektro.pacujo.net (sSMTP sendmail emulation); Wed, 30 Mar 2016 23:07:10 +0300 In-Reply-To: (Jan Wedekind's message of "Wed, 30 Mar 2016 20:43:57 +0100 (BST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:1bc8:1a0:5384:7a2b:cbff:fe9f:e508 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:18259 gmane.lisp.guile.user:12533 Archived-At: Jan Wedekind : > GOOPS supports "open" classes and multiple-dispatch. E.g. you can extend > the "write" method to control how an object is displayed within the > Guile REPL [1]. Another interesting approach are multi-methods in > Clojure which don't even require explicit types for dispatching. > > [1] http://wedesoft.de/oop-with-goops.html Your example demonstrates my problem with GOOPS: you are redefining (display) by penetrating the black box with (slot-ref). What would happen to your method if I changed the implementation of so it no longer has the slot x, even virtually. GOOPS' has the worst possible object model: objects are seen as mere data records. The concept of a "slot" is an anathema to OOP. Think of a UNIX file. You access it through open(2), write(2), read(2), close(2) and so on. You don't know and you shouldn't care how the file contents are organized on the disk (if there is a disk!). GOOPS would like to abandon the system calls and just expose the bytes (slots) on the disk. Then, GOOPS lets you define any kind of system calls you see fit. Marko