Welcome! Please see the About page for a little more info on how this works.

0 votes
in Records and Types by

Looking at the documentation for type I see how to find a type of an object. And in the see-also section it talks about the function instance? which tests whether an object is a member of a designated class.

Is the documentation using the word class and type interchangeably here?
What is the correct way to check type membership, assuming I have a type designator compatible with isa? ?

1 Answer

0 votes
by

These words are not being used interchangeably. "class" refers to the Java class hierarchy and can be checked with instance?.

"type" is the Java hierarchy plus a Clojure-specific form of "type tagging" that can be used to create arbitrary hierarchies of keywords, most frequently used with multimethods. isa? is the appropriate function for this broader context.

...