concept datum type in category clojure

appears as: data types, data types, data type
Clojure in Action, Second Edition

This is an excerpt from Manning's book Clojure in Action, Second Edition.

By namespacing your reader literals, you can be sure that they won’t ever collide with anyone else’s. Reader literals should be used sparingly, but they make it particularly easy to work with data types, and they can enhance the readability of your code.

Sooner or later, during your time on most projects, you’ll run into an abstraction-oriented issue known as the expression problem. It has to do with how to cleanly extend or use existing code—either something you wrote yourself or, more important, something you don’t own. In this chapter, we’ll explore the expression problem in some depth, as well as Clojure’s approach to handling it (protocols). Then, we’ll come up with a solution. Finally, we’ll explore the Clojure solution in more depth by looking at protocols, data types, and the reify macro.

9.3.2. Defining data types with deftype, defrecord, and reify

We started this chapter by considering the expression problem, and as you might recall, there are two sides to it, namely, data types and the operations on them. So far, we’ve been looking primarily at the operations side of the situation; in this section we’ll look at a couple ways to define data types.