YASOS


YASOS, Ken Dickey's 'Yet Another Scheme Object System,' very similar to T's object system, is based on the idea of generic objects on which certain operations are defined. Ken Dickey describes YASOS in his paper Scheming With Objects (SWOB). In YASOS & T, objects are simply regular 'things,' with nothing in particular special about them; they are not considered disjoint entities from other things such as pairs, vectors, strings, et cetera. As an example, the Scheme pair data type could have been defined using YASOS as:

 (define-predicate pair?) 
 (define-operation (car pair)) 
 (define-operation (cdr pair)) 
 (define-operation (set-car! pair a)) 
 (define-operation (set-cdr! pair d)) 
  
 (define (cons a d) 
   (object 
     ((pair? self) #t) 
     ((car self) a) 
     ((cdr self) d) 
     ((set-car! self new-a) 
      (set! a new-a)) 
     ((set-cdr! self new-d) 
      (set! d new-d)))) 

YASOS is included with SLIB


category-software

category-object-oriented