This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-23
Channels
- # beginners (114)
- # cljsrn (19)
- # clojure (35)
- # clojure-austin (1)
- # clojure-italy (9)
- # clojure-russia (8)
- # clojure-spec (6)
- # clojure-uk (5)
- # clojurescript (32)
- # datomic (12)
- # editors (3)
- # emacs (1)
- # hoplon (4)
- # jobs (6)
- # jobs-discuss (1)
- # luminus (2)
- # onyx (11)
- # parinfer (2)
- # portkey (6)
- # re-frame (7)
- # reagent (9)
- # remote-jobs (3)
- # schema (2)
- # shadow-cljs (23)
- # spacemacs (2)
- # specter (13)
- # vim (3)
- # yada (6)
Where is the canonical place to put specs? I read that clojure.core has them in a clojure.core.spec namespace . I'm thinking of making a separate namespace of .spec for each namespace in my app. But I will have some common specs (boilerplate stuff), but don't know where to put those. I'm not sure it matters since all of the defined specs are global.
clojure is canon-poor
I don’t know if there is a standard, but I’ve been putting them in the same namespace as the functions that manipulate the data. That way, other namespaces can require a single ns and get functions+specs
@bbrinck What about specs that are shared between namespaces? Say you have a spec definition for a core.async channel or a map structure that's shared all over your app, do you duplicate that everywhere or keep those sorts of things in a single namespace