Where to put specs for Clojure.Spec?

后端 未结 3 1418
无人及你
无人及你 2021-01-31 07:34

So, I\'m diving deeper and deeper into Clojure.Spec.

One thing I stumbled upon is, where to put my specs. I see three options:

3条回答
  •  闹比i
    闹比i (楼主)
    2021-01-31 08:07

    One other consideration depending on your use case - putting the specs alongside your main code limits use of your code to Clojure 1.9 clients, which may or may not be what you want. Like @levand, I would recommend a parallel namespace for each of your code namespaces.

提交回复
热议问题