开发者

Test if a class is a subclass of another class in common lisp

开发者 https://www.devze.com 2023-01-02 10:01 出处:网络
How do I se开发者_运维问答e if one CLOS class is a subclass of another CLOS class?You can get the CLASS-NAME of a class.

How do I se开发者_运维问答e if one CLOS class is a subclass of another CLOS class?


You can get the CLASS-NAME of a class.

A class has also a type of the same name.

SUBTYPEP tests if a type is a subtype of another type.


closer-mop provides a subclassp predicate

CL-USER> (c2mop:subclassp (find-class 'condition) (find-class 'error))
NIL
CL-USER> (c2mop:subclassp  (find-class 'error) (find-class 'condition))
T
0

精彩评论

暂无评论...
验证码 换一张
取 消