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: Fri, 01 Apr 2016 01:28:15 +0300 Message-ID: <87pouas2o0.fsf@elektro.pacujo.net> References: <87y492mnjp.fsf@pobox.com> <87io046wp7.fsf@drakenvlieg.flower> <87a8lfx37i.fsf@elektro.pacujo.net> <87shz7vifl.fsf@elektro.pacujo.net> <87egarvb5p.fsf@elektro.pacujo.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459463320 386 80.91.229.3 (31 Mar 2016 22:28:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Mar 2016 22:28:40 +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 Fri Apr 01 00:28:32 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 1all4q-0004Cn-6E for guile-devel@m.gmane.org; Fri, 01 Apr 2016 00:28:32 +0200 Original-Received: from localhost ([::1]:34825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1all4p-0000lh-1R for guile-devel@m.gmane.org; Thu, 31 Mar 2016 18:28:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1all4g-0000iw-1O for guile-devel@gnu.org; Thu, 31 Mar 2016 18:28:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1all4e-0007Wy-St for guile-devel@gnu.org; Thu, 31 Mar 2016 18:28:21 -0400 Original-Received: from [2001:1bc8:1a0:5384:7a2b:cbff:fe9f:e508] (port=45972 helo=pacujo.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1all4c-0007W9-DN; Thu, 31 Mar 2016 18:28:18 -0400 Original-Received: from elektro.pacujo.net (192.168.1.200) by elektro.pacujo.net; Fri, 1 Apr 2016 01:28:16 +0300 Original-Received: by elektro.pacujo.net (sSMTP sendmail emulation); Fri, 01 Apr 2016 01:28:15 +0300 In-Reply-To: (Jan Wedekind's message of "Thu, 31 Mar 2016 21:42:04 +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:18267 gmane.lisp.guile.user:12541 Archived-At: Jan Wedekind : > On Thu, 31 Mar 2016, Marko Rauhamaa wrote: >> (get-x) is only a fig leaf for (slot-ref). In general, no user of an >> object should think the object holds a piece of information >> called x. Instead, you should be interacting with the abstract object >> . > > Well, actually (get-x) is a generic as well. I.e. it is polymorphic > and does not have to be a simple accessor for a slot. Naturally, that's not my point. In practice, GOOPS can be used just like any classic object system. However, * The (make)/(initialize) mechanism is strongly tied to the slots. There is a strong temptation to define a nongeneric constructor function for each class that internally calls (make) with appropriate slot settings. This is suggested at the bottom of . Unfortunately, the separate constructor can't invoke a base class's constructor function but must contend with (make), which exposes the base class's slots to the derived class. Ideally, you should be able to interpret the keyword args to (make)/(initialize) independently of the slots. However, the (next-method) mechanism makes this tricky. * The (self ) notation makes code look very un-Schemey and noisy. For example, classic port dispatching is handled with the assumption that the port knows its methods. * The slot emphasis permeates the documentation and available facilities. The long is advertised as "a better solution" even though it is extremely noisy and complex numbers are extremely passive as objects (). What on earth are (shallow-clone) and (deep-clone) supposed to accomplish? Duplicate the database? Open another session to the server? Marko