Closed mfikes closed 5 years ago
Simplify the printing of vars and keywords, abbreviating them relative to the current namespace.
This makes things more readily fit on mobile screens, and is simpler for new users who haven't yet been exposed to the concept of namespaces.
So for example, a def of a var prints in a simpler way:
(defn square [x] (* x x)) #'square
Likewise, if you evaluate, say ::foo, you will see ::foo printed.
::foo
This PR also handles the same idea in namespace maps,
{::foo 1 ::bar 2 ::baz {::quux 3}}
prints as
#::{:foo 1, :bar 2, :baz #::{:quux 3}}
instead of the more verbose
#:cljs.user{:foo 1, :bar 2, :baz #:cljs.user{:quux 3}}
I'm not sure I have a strong opinion on this.
OK, gonna merge this. I've been trying it out and it seems OK. If we find any serious issues we can revisit.
Simplify the printing of vars and keywords, abbreviating them relative to the current namespace.
This makes things more readily fit on mobile screens, and is simpler for new users who haven't yet been exposed to the concept of namespaces.
So for example, a def of a var prints in a simpler way:
Likewise, if you evaluate, say
::foo
, you will see::foo
printed.This PR also handles the same idea in namespace maps,
prints as
instead of the more verbose