This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Guile and CLOS sorted....



OK - I've finally got it working :

I have installed :

Guile (latest snapshot)
SLIB (latest - untarred into .../share/guile/site)
tiny-clos 1.7 (can't remember where I got it - somewhere on the web)

I had to hack into support.scm in tiny-clos a bit - just to tell it that it was
 running guile (look at what-scheme-implementation), how guile should find
 'sort' (same as mit) and how 'gsort' should be defined for guile (same as mit).

Then do e.g.:

(set! %load-extensions (cons  ".scm" %load-extensions))
(set! %load-path (cons  "./tiny-clos-1.7" %load-path))

(use-modules (ice-9 slib))

(require "tiny-clos")

Success !

I can now define classes, generics and methods to my hearts content.

Syntax is a bit basic so I am cobbling up some macros (e.g. defmethod etc.)

Time will tell if it is fast enough.


My thanks to everyone who replied to my mails.

I'm not sure about the copyright on tiny-clos, but I think one of the guile
 maintainers should seriously look into including the patched version in the
 guile distribution as I for one would make a decent object system one of my
 first requirements.

tiny-clos is probably still far from perfect, but at least if people start using
 it, because it comes with guile, then they might improve it so tiny-clos and
 guile both benefit.


If anyone has a set of decent macros like defclass, defgeneric, defmethod etc I
 would be interested to receive them. They are bound to be better than what I
 have come up with.

Thanks again for all your time,



Jules