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
- Host: GitHub
- URL: https://github.com/jscl-project/closette-jscl
- Owner: jscl-project
- Created: 2018-05-14T14:25:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-20T18:38:04.000Z (over 7 years ago)
- Last Synced: 2025-06-26T07:41:21.584Z (12 months ago)
- Topics: closette, common-lisp, jscl
- Language: Common Lisp
- Size: 73.2 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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
```