[Top][All Lists]

[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: Fri, 29 Jul 2016 21:00:42 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux)

Kovacsics Róbert <address@hidden>:

> Thank you, I am still thinking in Java terms at the moment.
> [...]
> But this is a very classes-contain-methods approach and given what you
> said, makes me think that I'm doing this wrong thing.

I'm thinking GOOPS is the wrong thing here.

A better, more Schemey way is hiding in plain sight. Look at how ports
are created and manipulated. You have a rich set of methods that take
the best from Scheme and the classic object/method paradigm, eg:

   (with-output-to-string thunk)

   (with-input-from-file filename thunk)

   (port-filename port)

   (close-port port)

More generally, take a look at <URL:> and how
MAKE-CELL has been defined. That's true OOP without classes or slots.


reply via email to

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