-
Notifications
You must be signed in to change notification settings - Fork 18
Clojure style guide
Christopher Small edited this page May 17, 2014
·
5 revisions
It would be nice if we could agree on some things regarding coding style for Clojure.
- If
m
is a hash map, use(:key m)
instead of(m :key)
wherever possible. The former will still work ifm
is re-implemented as a record, but not the latter. - Prefer maps over records unless they become preferable for some reason down the road (for performance for instance). Note that while still simple they don't have the same level of structural sharing, so unless you need the performance better to avoid. We may modify this policy if we decide the expressiveness and self-documentation around a particular structure would benefit from being a record, but let's in general err on the side of simplicity for now.
Silly stuff, but it makes things easier to look at...
- 2 spaces indentation
So long and thanks for all the fish.