Boxing wraps a native primitive value in its corresponding reference class, such as converting a primitive long into a java.lang.Long. Clojure may perform this conversion implicitly when generated code passes primitive values to functions expecting Object arguments. section 6.5
Boxing can change reference identity
Vars can preserve one reference: (def a 1000) (def b a) (identical? a b) returns true. Local primitive values can instead be boxed separately: (let [x 1000 y x] (identical? x y)) returns false. Thus identical? can expose boxing behavior; use = when testing equivalence rather than reference identity. section 6.5
Explicit construction also matters: (identical? (Long. 100) 100) returns false. Long/valueOf can consult Java’s numeric cache, but cached identity is limited and should not replace value-based comparison. section 6.5


