File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -934,6 +934,21 @@ Use `*earmuffs*` for things intended for rebinding (ie. are dynamic).
934
934
Don't use a special notation for constants; everything is assumed a constant
935
935
unless specified otherwise.
936
936
937
+ [source,clojure]
938
+ ----
939
+ ;; good
940
+ (def max-size 10)
941
+
942
+ ;; bad
943
+ (def MAX-SIZE 10) ; Java style
944
+ (def +max-size+ 10) ; Common Lisp style, global constant
945
+ (def *max-size* 10) ; Common Lisp style, global variable
946
+ ----
947
+
948
+ NOTE: Famously `*clojure-version*` defies this convention, but you should
949
+ treat this naming choice is a historical oddity and not as an example to
950
+ follow.
951
+
937
952
=== Unused Bindings [[naming-unused-bindings]]
938
953
939
954
Use `+_+` for destructuring targets and formal argument names whose
You can’t perform that action at this time.
0 commit comments