Fork me on GitHub
#clojure-spec
<
2017-09-16
>
Olical11:09:13

Afternoon 🙂 I was wondering what sort of performance I could expect from s/fdef? Like, if I don't instrument, is it just a normal defn?

Olical11:09:50

Also, is it "normal" to automatically enable instrumentation during development within a library? Wondering how much spec goodness I can expose to the consumer of the library automatically without the performance hit in production builds.

gfredericks11:09:23

@olical the fdef is independent from the defn until instrumentation, so it should have no effect at all

Olical11:09:52

Awesome, that's what I was hoping for. Apologies if it was mentioned in the documentation and I didn't spot it.

Olical11:09:30

I was thinking of wrapping (s/instrument) within some sort of (when dev? ...). Not sure if that's possible or a good idea.

Olical11:09:29

(also I realise I was being dumb, you do defn and fdef next to each other, fdef does not replace defn)