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
Copy file name to clipboardexpand all lines: README.adoc
+6-6
Original file line number
Diff line number
Diff line change
@@ -860,27 +860,27 @@ But what to do about all the other namespaces out there that don't have idiomati
860
860
otherwise the people working on a shared Clojure codebase are going to experience a great deal of confusion. Here are a few rules that you should follow.footnote:[These guidelines are based on a https://stuartsierra.com/2015/05/10/clojure-namespace-aliases[blog post] by Stuart Sierra.]
861
861
862
862
1. Make the alias the same as the namespace name with the leading parts removed.
863
-
863
+
+
864
864
[source,clojure]
865
865
----
866
866
(ns com.example.application
867
867
(:require
868
868
[clojure.java.io :as io]
869
869
[clojure.reflect :as reflect]))
870
870
----
871
-
871
+
+
872
872
2. Keep enough trailing parts to make each alias unique.
873
-
873
+
+
874
874
[source,clojure]
875
875
----
876
876
[clojure.data.xml :as data.xml]
877
877
[clojure.xml :as xml]
878
878
----
879
-
879
+
+
880
880
TIP: Yes, namespace aliases can have dots in them. Make good use of them.
881
-
881
+
+
882
882
3. Eliminate redundant words such as "core" and "clj" in aliases.
0 commit comments