(defn public-name?
"Is sym public?"
#?(:cljs {:tag boolean})
[ns sym]
(let [var-ast (or (gets @env/*compiler* ::namespaces ns :defs sym)
#?(:clj (gets @env/*compiler* ::namespaces ns :macros sym)
:cljs (gets @env/*compiler* ::namespaces (symbol (str (name ns) "$macros")) :defs sym)))]
(and (some? var-ast)
(not (or (:private var-ast)
(:anonymous var-ast))))))