blob: fd9bc1bb1770716181603f914d0adf44d461ea5c [file] [log] [blame]
;;; oop.lisp
;; TODO
(defmacro defclass (name members)
"(defclass person (name age (occupation nil)))"
(let ((makefn-name (string->symbol (concat "make-" (symbol->string name))))
(class-sym (gensym))
(nmemb (length members)))
`(defun ,makefn-name ,members
(let ((,class-sym (make-class ,name ,nmemb)))
,class-sym))))