[CM] Snd 12.8

Heinrich Taube taube at illinois.edu
Wed Feb 1 17:04:59 PST 2012


guile, gauch, stklos, chicken all support (to one degree or another)   
a variant of cltl2 called tiny-clos that implemnted basic  
functionality of clos

as i recall the stklos doc was pretty good,

http://www.stklos.net/Doc/html/stklos-ref-8.html#STklos-Object-System

also gauche:

http://practical-scheme.net/gauche/man/gauche-refe_64.html#Introduction-to-the-object-system

and 'goops' in guile:

http://www.gnu.org/software/guile/manual/html_node/GOOPS.html

these tiny-clos derivatives didnt have lots of the bells and whistles  
but you could do 95% of typical cltl2 functionality. for example t--  
rather than cltl2's :around :before and :after methods -- these  
systems  let you call (call-next-method) when you want the next method.

i think make-instance was actually called make, ie

(make-instance 'foo)
is
(make <foo> )

and ininitialize-instance is called initialize.

so to implement an after method on initialize you would do


(define-method* (initialize (obj <mysuperclass>) args)
   (next-method)		
   ....)


my cm2 sources are actually written in tiny-clos and works in  these  
shemes. cltl2 sources are autogenerated from the scheme code if you  
load the cm system into common lisp.




More information about the Cmdist mailing list