Hi Stu, sure:
With Clojure 1.6, switching namespaces in a REPL results in the following output to the console:
1.6.0 % java -jar clojure-1.6.0.jar
Clojure 1.6.0
user=> (in-ns 'clojure.core)
#<Namespace clojure.core>
clojure.core=>
With Clojure 1.7, this looks like this:
1.7.0 % java -jar clojure-1.7.0.jar
Clojure 1.7.0
user=> (in-ns 'clojure.core)
#object[clojure.lang.Namespace 0x5efa40fe "clojure.core"]
clojure.core=>
Primary REPL users are humans, and the new way of printing arbitrary objects, #object[clojure.lang.Namespace 0x5efa40fe "clojure.core"], instead of #<Namespace clojure.core>, has been reported by users as a REPL regression. It's harder to decipher. The interesting information is at the far right, and there's more visual clutter.
A similar issue occurs if you want to recall the last throw exception:
With Clojure 1.6.0:
user=> *e
#<RuntimeException java.lang.RuntimeException: test>
user=>
With Clojure 1.7.0:
clojure.core=> *e
#error {
:cause "root"
:via
[{:type java.lang.RuntimeException
:message "test"
:at [clojure.core$eval3 invoke "NO_SOURCE_FILE" 5]}
{:type java.lang.RuntimeException
:message "root"
:at [clojure.core$eval3 invoke "NO_SOURCE_FILE" 5]}]
:trace
[[clojure.core$eval3 invoke "NO_SOURCE_FILE" 5]
[clojure.lang.Compiler eval "Compiler.java" 6782]
[clojure.lang.Compiler eval "Compiler.java" 6745]
[clojure.core$eval invoke "core.clj" 3081]
[clojure.main$repl$read_eval_print__7099$fn__7102 invoke "main.clj" 240]
[clojure.main$repl$read_eval_print__7099 invoke "main.clj" 240]
... [cut] ....
The interesting information starts at lines 4 and 5, and in real life scenario one must probably scroll up to find them at the very top of the stacktrace dump.
So, having that as the out of the box experience feels also like a REPL regression to me.
The patch in my first email intends to revert back to the 1.6 behavior for printing arbitrary java objects and exceptions, *only when printed for the REPL*, e.g. for consumption by a human.