Email or username:

Password:

Forgot your password?
Andrew Tropin

malli is great.

You can:
- Annotate your functions with type hints, use it compile time, runtime, in the linter.
- Validate data, parse or generate it.
- Serialize schemas to edn files, database or send it via network.
- Visualize it with graphviz or plantuml.
- Add type schemas afterwards or when you need it.

And everything is blazing fast. This is clojure.spec done right IMO.

github.com/metosin/malli

#clojure

4 comments
Macroz :emacs: :i3wm: :clj:

@abcdw Looks interesting.

We have been using Schema and do get similar benefits (already several years). #cljKondo seems to support plumatic.github.io/schema/sche from what I gather, as well as basic type hints of #Clojure (I've probably bumped into them in a warning already).

We've mostly used Schema for the API and DB layers so far, but gradual typing for core functions could be nice at this stage of the project.

Andrew Tropin

@Macroz Yep, schema IIRC is the oldest of those three (malli, spec, schema). It's nice and intuitive, but feels a little bit foreign, non-idiomatic, but it's just my perception. I'm a little impressed how good malli feels, it seems it took the best from schema and clojure.spec. Maybe I'll change my mind later, but I'm very satisfied rn :)

Asko Nõmm

@abcdw Some Malli errors however are horrendous, and point to no source, so you have to use your gut feeling to debug things. Am not a fan of that.

Andrew Tropin

@ano Did you report it? Maintainers are very helpful and responsive.

Go Up