File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -610,6 +610,23 @@ Avoid single-segment namespaces.
610
610
(ns example)
611
611
----
612
612
613
+ Namespaces exist to disambiguate names. Using a single segment
614
+ namespace puts you in direct conflict with everyone else using single
615
+ segment namespaces, thus making it more likely you will conflict with
616
+ another code base.
617
+
618
+ In practice this means that libraries should never use single-segment
619
+ namespace to avoid namespace conflicts with other libraries.
620
+ Within your own private app of course, you can do whatever you like.
621
+
622
+ TIP: It's common practice to use the convention `domain.library-name`
623
+ or `library-name.core` for libraries with a single namespace in them.
624
+ Read on for more coverage of the namespace naming topic.
625
+
626
+ There are https://github.com/bbatsov/clojure-style-guide/pull/100[other reasons]
627
+ why might want to avoid single-segment namespaces, so you should
628
+ think long and hard before making any use of them.
629
+
613
630
=== Namespace Segments Limit [[namespace-segments-limit]]
614
631
615
632
Avoid the use of overly long namespaces (i.e., more than 5 segments).
You can’t perform that action at this time.
0 commit comments