This is BETA release 0.1.8 of GOOPS, or Guile Object Oriented Programming System. Please send bug reports to bug-guile@gnu.org. GOOPS is the object oriented extention to Guile. Its implementation is derived from STk-3.99.3 by Erick Gallesio and version 1.3 of Gregor Kickzales `Tiny-Clos'. It is very close in spirit to CLOS, the Common Lisp Object System (`CLtL2') but is adapted for the Scheme language. While GOOPS is not compatible with any of these systems, GOOPS contains a compatibility module which allows for execution of STKlos programs. Briefly stated, the GOOPS extension gives the user a full object oriented system with multiple inheritance and generic functions with multi-method dispatch. Furthermore, the implementation relies on a true meta object protocol, in the spirit of the one defined for CLOS (Gregor Kiczales: A Metaobject Protocol). Getting started ====================================================== [Most of this section can be found in the texinfo documentation as well.] 1. Make sure that you have a version of Guile later than or equal to 1.3.2 installed on your system. (You can type guile -c '(write-line (version))' in your terminal window to check which version of Guile you have.) If not, see under "Obtaining GOOPS" how to get it. 2. Make sure that you stand in the `guile-oops' directory and type ./configure This will configure GOOPS for your system. 3. Type make install to build and install GOOPS. If everything went well we're ready to enter the interpreter: 4. Type guile-oops You should now be at the Guile prompt ("guile> "). 5. Type (use-modules (oop goops)) to load GOOPS. (If your system supports dynamic loading, you should be able to do this not only from `guile-oops' but from an arbitrary Guile interpreter.) We're now ready to try some basic GOOPS functionality. Generic functions (define-method + ((x ) (y )) (string-append x y)) (+ 1 2) --> 3 (+ "abc" "de") --> "abcde" User-defined types (define-class <2D-vector> () (x #:init-value 0 #:accessor x-component #:init-keyword #:x) (y #:init-value 0 #:accessor y-component #:init-keyword #:y)) (use-modules (ice-9 format)) (define-method write ((obj <2D-vector>) port) (display (format #f "<~S, ~S>" (x-component obj) (y-component obj)) port)) (define v (make <2D-vector> #:x 3 #:y 4)) v --> <3, 4> (define-method + ((x <2D-vector>) (y <2D-vector>)) (make <2D-vector> #:x (+ (x-component x) (x-component y)) #:y (+ (y-component x) (y-component y)))) (+ v v) --> <6, 8> Asking for the type of an object (class-of v) --> #< <2D-vector> 40241ac0> <2D-vector> --> #< <2D-vector> 40241ac0> (class-of 1) --> #< 401b2a98> --> #< 401b2a98> (is-a? v <2D-vector>) --> #t See further in the GOOPS tutorial available in this distribution in info (goops.info) and texinfo format. Some words of caution ================================================ This is the second beta release of GOOPS. While the basic functionality won't change much in the future, the MOP, more advanced features, and the internal representation will continue to move. The generic function application protocol is based upon an idea from PCL: We only compute the applicable methods for a certain type combination once, and then cache it. Currently, only the cache lookup mechanism is purely implemented in C. Most other parts have been prototyped in Scheme. This means that while GOOPS is extremely efficient when executing code many times, the first pass through the code is slow. We're very interested in comments about how GOOPS performs in larger projects. If you have any, please feel welcome to write to Mikael Djurfeldt . Anonymous CVS Access and FTP snapshots =============================== We make the developers' working Guile sources available via anonymous CVS, and by nightly snapshots, accessible via FTP. See the files `ANON-CVS' and `SNAPSHOTS' for details. If you would like to receive mail when people commit changes to the Guile CVS repository, you can subscribe to guile-cvs@sourceware.cygnus.com by sending a message to guile-cvs-subscribe@sourceware.cygnus.com. Even better, you can get daily digests of these commit messages by sending a message to guile-cvs-digest-subscribe@sourceware.cygnus.com. If you want to subscribe an e-mail address other than the one that appears in your From: header, say foo@bar.com, send a mail note to guile-cvs-subscribe-foo=bar.com@sourceware.cygnus.com. Obtaining GOOPS ====================================================== The latest official GOOPS release is available via anonymous FTP from ftp.gnu.org, as /pub/gnu/guile/guile-oops-0.1.8.tar.gz. Via the web, that's: ftp://ftp.gnu.org/pub/gnu/guile/guile-oops-0.1.8.tar.gz For getit, that's: ftp.gnu.org:/pub/gnu/guile/guile-oops-0.1.8.tar.gz If you don't already have Guile 1.3.4 installed on your system, you also need to download and install ftp://ftp.gnu.org/pub/gnu/guile/guile-core-1.3.4.tar.gz The mailing list `guile@sourceware.cygnus.com' carries discussions, questions, and often answers, about Guile. To subscribe, send mail to guile-subscribe@sourceware.cygnus.com. Of course, please send bug reports (and fixes!) to bug-guile@gnu.org. Note that one address is @sourceware.cygnus.com, and the other is at @gnu.org.