Skip to content

Developer tools · data validation library

Malli

Hacker Approved

A Clojure library for runtime data validation and schema-based example generation; commenters prefer it to ordinary type systems for rigidity.

Summarized from 16 comments.

A Clojure library for runtime data validation and schema-based example generation; commenters prefer it to ordinary type systems for rigidity.

recommend
15
criticize
0
months recommended
8 of 13

Why people love it

  • Runtime data validation beyond presence checks · 4

    Tacking on malli (runtime type checking) or spec (types/contracts) helps LLMs avoid type problems altogether

    May 2026 · comment

    If you want to calcify something and add robustness, use clojure.spec or Malli.

    Apr 2026 · comment

    validating the value properly rather than just checking for presence

    Jul 2026 · comment
  • More expressive than ordinary type systems · 2

    you can easily make those structural guarantees in a way that is more expressive than an ordinary type system

    Nov 2025 · comment

    Theyre more feature-rich than types

    Mar 2026 · comment
  • Generates example data and tests · 2

    there's always something that needs paranoia, or it's handy to generate example data

    Jun 2026 · comment

    generated tests based on Specs or Malli

    Apr 2026 · comment
  • Helps LLM coding agents avoid type errors · 2

    The LLM has been pretty good at falling back to looking at the schema if tests fail because of validation issues.

    May 2026 · comment

    Tacking on malli (runtime type checking) or spec (types/contracts) helps LLMs avoid type problems altogether

    May 2026 · comment

What hackers pick instead

Every quote

The 14 most detailed of 16 comments. Each links to the original.

  1. The LLM has been pretty good at falling back to looking at the schema if tests fail because of validation issues.

    Recommends · May 2026 · in “ClojureScript Gets Async/Await”

  2. you can easily make those structural guarantees in a way that is more expressive than an ordinary type system

    Recommends · Nov 2025

  3. Tacking on malli (runtime type checking) or spec (types/contracts) helps LLMs avoid type problems altogether

    Recommends · May 2026 · in “ClojureScript Gets Async/Await”

  4. there's always something that needs paranoia, or it's handy to generate example data

    Recommends · Jun 2026 · in “My thoughts after using Clojure for about a month”

  5. If you want to calcify something and add robustness, use clojure.spec or Malli.

    Recommends · Apr 2026 · in “Bringing Clojure programming to Enterprise (2021)”

  6. validating the value properly rather than just checking for presence

    Recommends · Jul 2026 · in “Clojure 1.13 adds support for checked keys”

  7. When need some rigidity - Spec/Malli are great.

    Recommends · Nov 2025 · in “Experiment: Making TypeScript immutable-by-default”

  8. generated tests based on Specs or Malli

    Recommends · Apr 2026 · in “Clojure: Transducers”

  9. Theyre more feature-rich than types

    Recommends · Mar 2026 · in “Show HN: I built a self-hosted course platform in Clojure”

  10. There are some _very good_ examples of (data-) DSLs provided by libraries

    Recommends · Apr 2026 · in “Bringing Clojure programming to Enterprise (2021)”

  11. you might throw schemas (eg. Malli) at pre 1.13

    Recommends · Jul 2026 · in “Clojure 1.13 adds support for checked keys”

  12. Case in point: spec vs. schema vs. malli.

    Mixed · Apr 2026 · in “A Perfectable Programming Language”

  13. generate a json schema with malli

    Mixed · Sep 2026 · in “Using jq to format JSON on the clipboard”

  14. malli is infinitely better

    Recommends · May 2026

Counts from 1,795,640 Hacker News comments, Nov 2025 to Nov 2026. How we count · Report a mistake