blob: fd9bc1bb1770716181603f914d0adf44d461ea5c [file] [log] [blame]
swissChili8b5ec7a2022-08-05 22:26:17 -07001;;; oop.lisp
2
3;; TODO
4(defmacro defclass (name members)
5 "(defclass person (name age (occupation nil)))"
6 (let ((makefn-name (string->symbol (concat "make-" (symbol->string name))))
7 (class-sym (gensym))
8 (nmemb (length members)))
9 `(defun ,makefn-name ,members
10 (let ((,class-sym (make-class ,name ,nmemb)))
11 ,class-sym))))