Fork me on GitHub
#beginners
<
2022-09-09
>
Erik Colson00:09:14

So, to spec or to malli?

seancorfield03:09:03

At work we've been heavy users of Spec since it first became available in the 1.9 prerelease: https://corfield.org/blog/2019/09/13/using-spec/ I like that it's "built-in" and supported by the core team.

Ben Sless06:09:48

Depends. The main benefits of malli are no global registry, high performance, schema properties, and built in coercion Spec is built in, the global registry might be a pro, not just a con, and you might like the syntax better

practicalli-johnny07:09:13

Use spec unless there is a need to use malli instead

👍 1
Eugene Mosh07:09:05

Hello friends!

👋 4
Eugene Mosh07:09:56

We have: nil Numbers Strings Characters Keywords Symbols Collections but where is Boolean??

Alex Miller (Clojure team)11:09:56

I'm not sure that's intended to be an exhaustive list. Yes, there are booleans too.

1
Eugene Mosh12:09:14

Thank you Alex! ♥️

Joel17:09:29

If I have code that uses a macro can I read/parse the macro before it is expanded? (defmacro macroA…) (macroA macro-a …) I want to be able to read the clojure file and look for usages of macroA, but be able to “parse” the code before expansion. Going futher the macro uses references to other similar macro uses in other namespaces that I would also like to inspect… (macroA macro-a (other-ns/macro-b-usage … )) So I’d like to find macro-b-usage as well and parse it similarly. I wasn’t sure what API’s would allow me that information.