From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marko Rauhamaa Newsgroups: gmane.lisp.guile.user,gmane.lisp.guile.devel Subject: Re: anyone define port types? Date: Wed, 30 Mar 2016 20:53:05 +0300 Message-ID: <87a8lfx37i.fsf@elektro.pacujo.net> References: <87y492mnjp.fsf@pobox.com> <87io046wp7.fsf@drakenvlieg.flower> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1459360402 23588 80.91.229.3 (30 Mar 2016 17:53:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Mar 2016 17:53:22 +0000 (UTC) Cc: Andy Wingo , "guile-user@gnu.org" , guile-devel To: Panicz Maciej Godek Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Mar 30 19:53:21 2016 Return-path: Envelope-to: guile-user@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 1alKIz-0003XB-IQ for guile-user@m.gmane.org; Wed, 30 Mar 2016 19:53:21 +0200 Original-Received: from localhost ([::1]:56089 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alKIz-0008Ft-4O for guile-user@m.gmane.org; Wed, 30 Mar 2016 13:53:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alKIo-0008EU-K2 for guile-user@gnu.org; Wed, 30 Mar 2016 13:53:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alKIn-0000Ih-It for guile-user@gnu.org; Wed, 30 Mar 2016 13:53:10 -0400 Original-Received: from [2001:1bc8:1a0:5384:7a2b:cbff:fe9f:e508] (port=36612 helo=pacujo.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alKIn-0000Hu-B3 for guile-user@gnu.org; Wed, 30 Mar 2016 13:53:09 -0400 Original-Received: from elektro.pacujo.net (192.168.1.200) by elektro.pacujo.net; Wed, 30 Mar 2016 20:53:05 +0300 Original-Received: by elektro.pacujo.net (sSMTP sendmail emulation); Wed, 30 Mar 2016 20:53:05 +0300 In-Reply-To: (Panicz Maciej Godek's message of "Wed, 30 Mar 2016 19:17:25 +0200") 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-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:12528 gmane.lisp.guile.devel:18255 Archived-At: Panicz Maciej Godek : > 2016-03-30 13:18 GMT+02:00 Jan Nieuwenhuizen : > >> Panicz Maciej Godek writes: >> >> > I also used GOOPS, which I regret to this day, and so the >> > whole framework needs a serious rewrite >> >> What is it that you do not like about GOOPS? > > Most specifically, I dislike its middle three letters. The problem > with OOP is that it requires to know exactly what ones want -- it is > difficult to change the design of your program after it's been written > (and it is also difficult to come up with a good design from the > beginning), and -- since it is based on state mutation - it makes it > difficult to reason about your program. > > On the practical side, it was a bit counterintuitive that and > were unrelated, and I think that there were some issues with > and types. I like OOP, only I don't like GOOPS. Its classes and generic functions seem so idiomatically out of place, unschemish, if you will. This is how OOP ought to be done: I have created a tiny Guile module ("simpleton") that generalizes the principle. In particular, * You don't need classes for OOP. You only need objects. * Do tie methods to objects. Don't pretend methods are external to objects. * Don't expose the internal state of objects. Only interact with the object through methods. Marko