GOOPS is the object oriented extension to Guile. Its implementation is derived from STk-3.99.3 by Erick Gallesio and version 1.3 of Gregor Kiczales’ Tiny-Clos. It is very close in spirit to CLOS, the Common Lisp Object System, but is adapted for the Scheme language.
GOOPS is a full object oriented system, with classes, objects, multiple inheritance, and generic functions with multi-method dispatch. Furthermore its implementation relies on a meta object protocol — which means that GOOPS’s core operations are themselves defined as methods on relevant classes, and can be customised by overriding or redefining those methods.
To start using GOOPS you first need to import the
module. You can do this at the Guile REPL by evaluating:
(use-modules (oop goops))
|• Copyright Notice:|
|• Class Definition:|
|• Instance Creation:|
|• Slot Options:|
|• Slot Description Example:|
|• Methods and Generic Functions:|
|• GOOPS Error Handling:|
|• GOOPS Object Miscellany:|
|• The Metaobject Protocol:|
|• Redefining a Class:|
|• Changing the Class of an Instance:|