But named? to mean instance? clojure.lang.Named tells you that something implements the Named interface which has getName() *and* getNamespace() methods β and the namespace function does *not* accept a String.
The fact that the name function accepts something that is not Named is a bit of an anomaly. Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood On 6/8/16, 2:59 PM, "Josh Tilles" <clojure@googlegroups.com on behalf of j...@signafire.com> wrote: Well, itβs worth noting that clojure.core/name does account for strings: (defn name "Returns the name String of a string, symbol or keyword." {:tag String :added "1.0" :static true} [x] (if (string? x) x (. ^clojure.lang.Named x (getName)))) So one could argue that named? should recognize strings in addition to keywords and symbols. No comment on whether such a predicate is a good idea though. On Wednesday, June 8, 2016 at 5:40:06 PM UTC-4, Sean Corfield wrote: Given the only two things in Clojure that implement Named are keyword and symbol β and we have ident? β what additional value would named? have? (but, yes, that was my first thought when I saw the list of new predicates) Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood On 6/8/16, 1:13 PM, "Devin Walters (devn)" <clo...@googlegroups.com on behalf of dev...@gmail.com> wrote: Any chance of `named?` making the cut in 1.9? I see it's used in the implementation of clojure.spec. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.