From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: gmane.lisp.guile.user Subject: Re: Modules and GOOPS Date: Sun, 31 Jul 2016 19:38:21 +0300 Message-ID: <87a8gxepaa.fsf@elektro.pacujo.net> References: <20160728181425.5f167237@capac> <87h9b8fho5.fsf@elektro.pacujo.net> <20160731114411.4d36bd08@dell.homenet> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1469983162 1985 80.91.229.8 (31 Jul 2016 16:39:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 31 Jul 2016 16:39:22 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) Cc: guile-user@gnu.org To: Chris Vine Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jul 31 18:39:04 2016 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTtlY-0000Qw-Eq for guile-user@m.gmane.org; Sun, 31 Jul 2016 18:39:04 +0200 Original-Received: from localhost ([::1]:40164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTtlU-0003x7-G1 for guile-user@m.gmane.org; Sun, 31 Jul 2016 12:39:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTtkw-0003x2-0a for guile-user@gnu.org; Sun, 31 Jul 2016 12:38:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTtkv-0001Hp-0l for guile-user@gnu.org; Sun, 31 Jul 2016 12:38:25 -0400 Original-Received: from [2001:1bc8:1a0:5384:7a2b:cbff:fe9f:e508] (port=35672 helo=pacujo.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTtku-0001Hl-QR for guile-user@gnu.org; Sun, 31 Jul 2016 12:38:24 -0400 Original-Received: from elektro.pacujo.net (192.168.1.200) by elektro.pacujo.net; Sun, 31 Jul 2016 19:38:21 +0300 Original-Received: by elektro.pacujo.net (sSMTP sendmail emulation); Sun, 31 Jul 2016 19:38:21 +0300 In-Reply-To: <20160731114411.4d36bd08@dell.homenet> (Chris Vine's message of "Sun, 31 Jul 2016 11:44:11 +0100") 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.21 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" Xref: news.gmane.org gmane.lisp.guile.user:12814 Archived-At: Chris Vine : > On Fri, 29 Jul 2016 21:00:42 +0300 > Marko Rauhamaa wrote: > [snip] >> More generally, take a look at > http://www.delorie.com/gnu/docs/guile/guile-tut_10.html> and how >> MAKE-CELL has been defined. That's true OOP without classes or slots. > > For that simple kind of use you might as well use records. R6RS > records are also inheritable, so you can construct type heirarchies; > SRFI-9 records are not. Guile provides both. The key is not to specify types (records or otherwise). Provide a constructor plus opaque objects that have methods. As for the "simple kind of use," there is no need for anything more complicated in object-oriented programming. How would the MAKE-CELL example above benefit from R6RS records? Marko