Skip to Content
Practical Clojure
book

Practical Clojure

by Luke VanderHart, Stuart Sierra
June 2010
Beginner to intermediate
226 pages
5h 33m
English
Apress
Content preview from Practical Clojure

Chapter 13. Datatypes and Protocols

Clojure is built on abstractions: sequences, references, macros, and so forth. However, most of those abstractions are implemented in Java, as classes and interfaces. It is difficult to add new abstractions to the language (for example, a queue data structure) without implementing them in Java.

Clojure 1.2 introduces several new features to make it easier to implement new abstractions directly in Clojure, while still taking full advantage of the performance optimizations in the Java platform. Datatypes and protocols are roughly analogous to Java's classes and interfaces, but they are more flexible.

Note

As of this writing, Clojure 1.2 has not yet been released. Although the concepts will remain the same, there ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Clojure Applied

Clojure Applied

Ben Vandgrift, Alex Miller
Clojure Programming

Clojure Programming

Chas Emerick, Brian Carper, Christophe Grand
Living Clojure

Living Clojure

Carin Meier

Publisher Resources

ISBN: 9781430272311Purchase book