guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modules and GOOPS


From: Marko Rauhamaa
Subject: Re: Modules and GOOPS
Date: Sun, 31 Jul 2016 19:38:21 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux)

Chris Vine <address@hidden>:

> On Fri, 29 Jul 2016 21:00:42 +0300
> Marko Rauhamaa <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]