Fork me on GitHub
#clojure-spec
<
2019-12-19
>
valerauko16:12:05

are there any tools to use spec for static checks?

alexmiller16:12:27

it's something that's inherently going to have limits, but I was surprised at how far it went

valerauko16:12:32

awesome! and so many stars too! gonna dive in during the holidays

alexmiller16:12:31

there's a talk about it from Conj a couple years ago too

joefromct18:12:56

if i just type into a repl a fn and a fdef, is there any reason it wouldn't be enforced for a given project? I have an older project I'm jumping into and can't understand why my fdef's aren't throwing errors... I'm sure check-asserts is true although i didn't think that would even matter.

alexmiller18:12:20

fdef on macro or function?

alexmiller18:12:32

if function, you have to instrument it for it to do anything

joefromct18:12:10

ok, so runtime checks have to be inside the form... either with an assertion, :pre check, or conform. I guess i missed that in the gude... I think i'll plug in an assertion so i can turn it off when i'm done with my test/dev/exploration on trying to figure out these data structures.

joefromct18:12:33

^ fdef on a function

alexmiller18:12:49

note that there is a s/assert

joefromct18:12:01

thanks as always for your help Alex