Kovacsics Róbert <kovir...@gmail.com>: > 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: 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. Marko