liveBook · Manning

Clojure

As explained in Clojure: The Essential Reference

A hosted functional programming language that runs primarily on the Java Virtual Machine and emphasizes immutable data and persistent data structures.

Clojure is a hosted functional programming language whose de facto reference implementation runs on the Java Virtual Machine (JVM). Its bundled functions are a practical starting point for working with collections, numbers, strings, I/O, and concurrency. section 1.3 section 1.4

The available tools fall into three useful groups:

  • clojure.core supplies functions and macros that are available without an explicit namespace reference. section 1.4
  • Other bundled namespaces cover particular tasks. For example, clojure.string/upper-case names a function through its namespace; some functions require the namespace to be loaded with require. section 1.4
  • Java SDK facilities are accessible through Java interoperability, but are distinct from Clojure’s bundled namespaces. section 1.4

Persistent data structures help make explicit locking unnecessary in Clojure’s usual approach to concurrency. Futures, promises, and delays control threads; refs, atoms, and agents provide different guarantees for shared state. Explicit locking remains available for exceptional low-level cases. section 14.0

Runtime choice matters: ClojureCLR targets the Common Language Runtime, while ClojureScript translates to JavaScript. They share many functions with JVM Clojure but are not drop-in replacements; behavior can differ, and an application may need changes. To learn an unfamiliar function, inspect its documentation and source, try it at the REPL, and test inputs such as nil or unexpected types. section 1.3 section 1.7

How Clojure: The Essential Reference covers it

How deep it goes
Explores functions through examples and selected internals, rather than through a formal language specification.
Examples
Illustrates namespace access with clojure.string/upper-case and concurrency tools with futures, promises, delays, refs, atoms, and agents.
What it assumes
Assumes intermediate Clojure experience for deeper use; offers some background but does not replace an introduction for beginners.
What you can do after
Apply it via bundled namespaces to routine programming tasks, and diagnose function edge cases at the REPL.
How it connects
Connects persistent data structures to concurrency, and namespaces to Java interoperability.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Clojure: The Essential Reference. The section links point to the parts of the book it draws on.