Fork me on GitHub

hello everyone


what is the spec for checking file data type ?


you mean like that #(instance? %)?

đź‘Ť 4

Hey Folks, I am learning spec and need help to understand the registry parte. They say that it help to avoid name collision, but since we already have namespaces, they aren't enough to avoid that? I don't get to see the real advantage of using :: in spec declaration. Can someone help me to understand please with example will be wonderful

Alex Miller (Clojure team)13:11:47

::keywords are “auto-resolved” to have the current namespace so it’s just a useful tool for succinctly making qualified keywords

Alex Miller (Clojure team)13:11:39

They create the exact same result as using :my.ns/keyword so use that if you prefer!

Alex Miller (Clojure team)14:11:10

You’ll see them in a lot of examples as it just makes the example shorter


Thank you very much @alexmiller


I think I`ve got the big picture now. When you want to use a spec/def, first spec look in the spec-registry if exist then take from there. Else it create it and store it in the spec-registry. A very naive description of course hehehe


Hey Folks, when should I use qualified or unqualified keys in clojure spec?

Alex Miller (Clojure team)19:11:30

unless you are working with existing data, don't want to transform it, and it has unqualified keys

thanks3 4