Hacker News new | past | comments | ask | show | jobs | submit login

Consistency in Clojure comes mainly from things like:

FP is the default idiom, state is very isolated and explicit.

The language is dead simple and often declarative.

The way you write Clojure programs is by attaching a REPL to your editor and by evaluating expressions in isolation. And you'll be running a linter like clj-kondo[1]. This has a similar effect as running a type checker (and it in fact does catch a lot of things that a type checker does).

Clojure spec can express much more than most (mainstream) type systems, is itself introspective and can be used for generative testing.

First class support for names: Keywords are not explicitly attached to their containers/data-structures but can be optionally be attached to namespaces and specs. This means a lot of problems that arise when changing code are simply avoided in Clojure. They still carry around the semantics and consistency you gave them, regardless of where they are used.

I've been working on a side project since about a year now and I can't remember when I last had a type error.

[1] https://github.com/borkdude/clj-kondo




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: