From: Marko Rauhamaa <marko@pacujo.net>
To: Chris Vine <chris@cvine.freeserve.co.uk>
Cc: guile-user@gnu.org
Subject: Re: Modules and GOOPS
Date: Sun, 31 Jul 2016 19:38:21 +0300 [thread overview]
Message-ID: <87a8gxepaa.fsf@elektro.pacujo.net> (raw)
In-Reply-To: <20160731114411.4d36bd08@dell.homenet> (Chris Vine's message of "Sun, 31 Jul 2016 11:44:11 +0100")
Chris Vine <chris@cvine.freeserve.co.uk>:
> On Fri, 29 Jul 2016 21:00:42 +0300
> Marko Rauhamaa <marko@pacujo.net> wrote:
> [snip]
>> More generally, take a look at <URL:
>> 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
next prev parent reply other threads:[~2016-07-31 16:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 17:53 Modules and GOOPS Kovacsics Róbert
2016-07-27 19:44 ` Jan Wedekind
2016-07-28 22:36 ` David Pirotte
2016-07-28 21:14 ` David Pirotte
2016-07-29 5:17 ` David Pirotte
2016-07-29 17:00 ` Kovacsics Róbert
2016-07-29 18:00 ` Marko Rauhamaa
2016-07-31 3:59 ` David Pirotte
2016-07-31 10:44 ` Chris Vine
2016-07-31 16:38 ` Marko Rauhamaa [this message]
2016-07-31 2:35 ` David Pirotte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8gxepaa.fsf@elektro.pacujo.net \
--to=marko@pacujo.net \
--cc=chris@cvine.freeserve.co.uk \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).