News for hackers. Stuff that matters.
Re:Why I'm Productive in Clojure (2013) by vemv on Sunday October 22, 2017 @07:32AM (#15526272)
Clojure has `defrecord`, so you can `defrecord User`.

Then you can assert that `user` is a User, with type hints, preconditions, 'spec' (a Clojure library), tests, docstrings, or some ad-hoc convention ("this kind of namespace does this kind of data transformation").

Then again, some Clojure users might prefer to use plain hashmaps (Rich tends to encourage this; or at least that's the common interpretation from his talks), and none of the mentioned mechanisms.

The mechanisms are there. Up to each to use them or not, depending on your scenario (and sincerely on one's competence too)

There are no comments on this comment yet.