Clojure programs start at the top of the "main" namespace (often project-name.core) and rank each form from top to bottom. This happens when the program starts, and before any "basic" functions are activated.
When the require
expression is evaluated, it jumps into this namespace and does the same. If a meeting requirement is required, it repeats the branches of these namespaces, recursively loads each namespace as necessary .
So, unless you explicitly state that your namespace requires a different namespace, then you are in the grip of the order that other namespaces require you to load their dependencies. Sometimes this will work, and sometimes unrelated changes in the evaulation order of your distant dependencies will break your code .
So please, please ... declare your own requirements!
source share