Created
November 30, 2013 13:07
-
-
Save g000001/7718867 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; AspectL | |
;; http://sourceforge.net/p/closer/aspectl/ci/master/tree/ | |
;; http://common-lisp.net/project/aspectl/overview.html | |
;; http://clozure.com/pipermail/openmcl-devel/2013-April/014253.html | |
(defclass person () | |
((name :accessor name :initarg :name))) | |
;=> #<STANDARD-CLASS PERSON> | |
(describe (make-instance 'person)) | |
;>> #<PERSON {101C4214F3}> | |
;>> [standard-object] | |
;>> | |
;>> Slots with :INSTANCE allocation: | |
;>> NAME = #<unbound slot> | |
;>> | |
;=> <no values> | |
(aspectl:with-class 'person | |
(aspectl:class-add | |
:direct-slots | |
'(age :accessor age :initarg :age))) | |
;=> #<STANDARD-CLASS PERSON> | |
(describe (make-instance 'person)) | |
;>> #<PERSON {101C4E21F3}> | |
;>> [standard-object] | |
;>> | |
;>> Slots with :INSTANCE allocation: | |
;>> AGE = #<unbound slot> | |
;>> NAME = #<unbound slot> | |
;>> | |
;=> <no values> | |
(aspectl:with-class 'person | |
(aspectl:class-remove :direct-slots 'name)) | |
;=> #<STANDARD-CLASS PERSON> | |
(describe (make-instance 'person)) | |
;>> #<PERSON {101C6014F3}> | |
;>> [standard-object] | |
;>> | |
;>> Slots with :INSTANCE allocation: | |
;>> AGE = #<unbound slot> | |
;>> | |
;=> <no values> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment