Spec, Re-frame, and Choosing Keywords

I’d stick the specs in the same Clojure file unless you have a reason to do otherwise. Then you can also use the ::name shorthand to get a ns qualified key for the current ns.

An example for when you need to put specs somewhere else is if you need to add specs for someone else’s library.

I think the spec guide is the best resource you’ll find. If that doesn’t suffice, you can try posting in the Clojurians Slack and hope for a reply by Alex Miller :slight_smile:

https://clojure.org/guides/spec

Overall, I think I see where you’re coming from. Ns qualified keys didn’t make sense to me at first. I don’t think you have to worry too much about it. Ns qualified keys are great for avoiding conflicts. But if you don’t need that yet, normal keywords are probably fine!

2 Likes