You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's common knowledge that code is read much more often than it is written.
84
83
The guidelines provided here are intended to improve the readability of code and make it consistent across the wide spectrum of Clojure code.
85
-
They are also meant to reflect real-world usage of Clojure instead of a random ideal. When I had to choose between a very established practice
86
-
and a subjectively better alternative I've opted to recommend the established practice.footnote:[Occasionally I might suggest to the reader to consider some alternatives, though.]
84
+
They are also meant to reflect real-world usage of Clojure instead of a random ideal. When we had to choose between a very established practice
85
+
and a subjectively better alternative we've opted to recommend the established practice.footnote:[Occasionally we might suggest to the reader to consider some alternatives, though.]
87
86
88
87
There are some areas in which there is no clear consensus in the Clojure community regarding a particular style (like semantic indentation vs fixed indentation, semantic comments vs uniform comments, etc).
89
88
In such scenarios all popular styles are acknowledged and it's up to you to pick one and apply it consistently.
90
89
91
90
Fortunately Clojure is a Lisp, and Lisps are fundamentally
92
91
simple. Even though this guide was created a few years after Clojure
93
-
(I published the first version in early 2013), you could see that most
94
-
Clojure code in the wild was fairly uniform. I attribute this to
95
-
both the simplicity I already mentioned and to the fact that since day
92
+
(the first version was published in early 2013), you could see that most
93
+
Clojure code in the wild was fairly uniform. We attribute this to
94
+
both the simplicity we already mentioned and to the fact that since day
96
95
1 Clojurists adopted many of the style conventions of other
97
96
established Lisp dialects (e.g. Common Lisp and Scheme). This made
98
97
the work on this guide fairly easy and straight-forward, especially compared to
99
98
the massive exercise in frustration that was the
100
99
https://rubystyle.guide[Community Ruby Style Guide].footnote:[You'll notice that the Clojure style guide is pretty similar in structure to the Ruby style guide, which served as its main source of inspiration. You'll also notice that the Ruby style guide is much longer, mostly because of the complexity of the Ruby language.]
101
100
102
-
Clojure is famously optimized for simplicity and clarity. I'd like to believe that this guide is going to help you optimize for maximum
101
+
Clojure is famously optimized for simplicity and clarity. We'd like to believe that this guide is going to help you optimize for maximum
103
102
simplicity and clarity.
104
103
105
104
=== A Note About Consistency
@@ -807,7 +806,7 @@ You might have noticed that those are a bit inconsistent:
807
806
* `clojure.walk` becomes `walk`
808
807
* `clojure.spec.alpha` becomes `spec`
809
808
810
-
I guess it's clear that the one thing they have in common is that they aim to be concise, but still carry some meaning (aliasing `clojure.walk` to `w` would
809
+
It's clear that the one thing they have in common is that they aim to be concise, but still carry some meaning (aliasing `clojure.walk` to `w` would
811
810
be concise, but won't carry much meaning).
812
811
813
812
But what to do about all the other namespaces out there that don't have idiomatic aliases? Well, you better be consistent in your approach to deriving aliases for them,
0 commit comments