Hacker ApprovedDepartments

clojure.spec

Hacker Approved

Ranked 3 of 5 data validation libraries by recommenders

Built into Clojure, spec lets people express structural guarantees more expressively than an ordinary type system. Critics say it mostly retrofits static typing onto a dynamic language.

Built into Clojure, spec lets people express structural guarantees more expressively than an ordinary type system. Critics say it mostly retrofits static typing onto a dynamic language.

22 people gave an opinion

recommend it
18
criticize it
4
approval share
82%
Each figure is one person. RecommendsCriticizes

Recommended in 9 of 13 months

  1. November 2025: recommended
  2. December 2025: recommended
  3. January 2026: recommended
  4. February 2026: not recommended
  5. March 2026: recommended
  6. April 2026: recommended
  7. May 2026: recommended
  8. June 2026: recommended
  9. July 2026: recommended
  10. August 2026: recommended
  11. September 2026: not recommended
  12. October 2026: not recommended
  13. November 2026: not recommended (month in progress)

Why it carries the badge

  • 18 people recommend itNeeds 10 or more, met.
  • 4.5 recommenders for every criticNeeds 2 to 1 or better, met.
  • Recommended in 9 of 13 monthsNeeds 4 or more, met.

The same three rules apply to every product, and the badge can’t be bought. How the badge works

What people say about it

The reasons people give, with the number of comments that give each one. Open a reason to read what they said.

Why people recommend it

Each mark is one comment

  • More expressive than static typing

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

    Comment from 1 Nov 2025 on Hacker News

    “clojure.spec offers something that is even better than static typing (imo)”

    Comment from 26 Mar 2026 in “Swift 6.3 Released”

    “Theyre more feature-rich than types”

    Comment from 1 Mar 2026 in “Show HN: I built a self-hosted course platform in Clojure”
  • Recommended for rigidity and robustness

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

    Comment from 3 Apr 2026 in “Bringing Clojure programming to Enterprise (2021)”

    “When need some rigidity - Spec/Malli are great.”

    Comment from 18 Nov 2025 in “Experiment: Making TypeScript immutable-by-default”
  • Puts invariants in code

    “To put those invariants in code and not in your head is so liberating.”

    Comment from 20 Aug 2026 in “A theory for decades of C vulnerabilities”

    “Spec solves this by making each artifact self-contained.”

    Comment from 14 Jan 2026 in “Show HN: Spec – A language-agnostic IR for LLM agents (live demo)”
  • Works with existing map functions

    “Plus you get to leverage the million other functions that already work on maps”

    Comment from 5 Nov 2025 on Hacker News

    “I religiously use spec'ed maps in my Clojure since a great many years”

    Comment from 6 Jul 2026 in “Clojure 1.13 adds support for checked keys”

What people warn about

Each mark is one comment

  • Harsh criticism of its design

    “I think core.spec makes no sense”

    Comment from 10 May 2026 on Hacker News

    “and the turd that is spec”

    Comment from 18 Mar 2026 in “Type systems are leaky abstractions: the case of Map.take!/2”

Other data validation libraries people recommend

The four most recommended other data validation libraries, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.

clojure.spec compared with 4 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
Pydantic621581%10—Approved
Zod582074%11—Approved
clojure.specThis page18482%9—Approved
Malli150100%8—Approved
Guardrails AI5183%7——
See all 5 data validation libraries, ranked

What people said

22 of the 25 comments that mention it, newest first. Each links to the original comment.

“To put those invariants in code and not in your head is so liberating.”

RecommendsComment from 20 Aug 2026 in “A theory for decades of C vulnerabilities”

“a comprehensive score like what Geekbench and SPEC provide is valuable”

RecommendsComment from 23 Jul 2026 in “Geekbench 7”

“there are better solutions to this problem that already exist, such as using spec/malli”

RecommendsComment from 7 Jul 2026 in “Clojure 1.13 adds support for checked keys”

“I religiously use spec'ed maps in my Clojure since a great many years”

RecommendsComment from 6 Jul 2026 in “Clojure 1.13 adds support for checked keys”

“many people use `spec` to sort of retrofit static typing”

MixedComment from 3 Jun 2026 in “My thoughts after using Clojure for about a month”

“I think core.spec makes no sense”

CriticizesComment from 10 May 2026 on Hacker News

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

RecommendsComment from 8 May 2026 in “ClojureScript Gets Async/Await”

“generated tests based on Specs or Malli”

RecommendsComment from 22 Apr 2026 in “Clojure: Transducers”

“That's a genuine design space with genuine ideas in it, regardless of whether you like dynamic typing.”

RecommendsComment from 22 Apr 2026 in “Clojure: Transducers”

“Tape-patches for self-inflicted language design issues isn't innovation, lol”

CriticizesComment from 21 Apr 2026 in “Clojure: Transducers”

“A spec does similar (and it does make it easier to seek through the source to find it).”

RecommendsComment from 11 Apr 2026 in “Clojure on Fennel Part One: Persistent Data Structures”

“There have been some abortive attempts at solving this with things like spec”

CriticizesComment from 11 Apr 2026 in “Clojure on Fennel Part One: Persistent Data Structures”

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

RecommendsComment from 3 Apr 2026 in “Bringing Clojure programming to Enterprise (2021)”

“There are some _very good_ examples of (data-) DSLs provided by libraries”

RecommendsComment from 2 Apr 2026 in “Bringing Clojure programming to Enterprise (2021)”

“clojure.spec offers something that is even better than static typing (imo)”

RecommendsComment from 26 Mar 2026 in “Swift 6.3 Released”

“and the turd that is spec”

CriticizesComment from 18 Mar 2026 in “Type systems are leaky abstractions: the case of Map.take!/2”

“Theyre more feature-rich than types”

RecommendsComment from 1 Mar 2026 in “Show HN: I built a self-hosted course platform in Clojure”

“Spec solves this by making each artifact self-contained.”

RecommendsComment from 14 Jan 2026 in “Show HN: Spec – A language-agnostic IR for LLM agents (live demo)”

“Spec is definitely underrated here considering it's built into the language and has a wider scope”

RecommendsComment from 7 Dec 2025 in “The programmers who live in Flatland”

“When need some rigidity - Spec/Malli are great.”

RecommendsComment from 18 Nov 2025 in “Experiment: Making TypeScript immutable-by-default”

“Plus you get to leverage the million other functions that already work on maps”

RecommendsComment from 5 Nov 2025 on Hacker News

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

RecommendsComment from 1 Nov 2025 on Hacker News

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