An open API service indexing awesome lists of open source software.

https://github.com/jscl-project/closette-jscl

Port CLOSETTE to JSCL
https://github.com/jscl-project/closette-jscl

closette common-lisp jscl

Last synced: 5 months ago
JSON representation

Port CLOSETTE to JSCL

Awesome Lists containing this project

README

          

# closette
Closette - a toy Common Lisp Object System (CLOS) described in The Art of the Metaobject Protocol (AMOP)

Modified from original for JSCL.

Compilation and running was done in Moren environment.

## Status

beta version under devepolment

## Test generic

```lisp

(defgeneric mctest (x))
(defmethod mctest :around ((x integer))
(format t "(:around integer)")
(call-next-method))
(defmethod mctest :around ((x number))
(format t "(:around number)")
(call-next-method))
(defmethod mctest :before ((x number))
(format t "(:before number)"))
(defmethod mctest ((x number))
(format t "(primary number)")
(1+ (call-next-method)))
(defmethod mctest :after ((x number))
(format t "(:after number)"))
(defmethod mctest :before ((x t))
(format t "(:before t)"))
(defmethod mctest ((x t))
(format t "(primary t)")
100)
(defmethod mctest :after ((x t))
(format t "(:after t)"))

(mctest 1)
;; =>
(:around integer)(:around number)(:before number)(:before t)(primary number)(primary t)(:after t)(:after number)101

```