(rontolisp) docs
← Namespaces

ns

(ns name clauses...)

Switches to the namespace, creating it, and wires its clauses: :as registers an alias, :refer/:use unqualified names, :import class names for interop, and (:refer-clojure :only ...)/(:refer-clojure :exclude ...) narrow the visible core. :as-alias in a :require libspec registers an alias without loading the namespace, and :rename {old new} refers a var under another name (the old name is not referred); (:refer-clojure :rename {old new}) does the same for a core var. (:load "path" ...) loads files like load, and (:gen-class ...) is accepted and ignored: no class is generated. The definitions below the form belong to the namespace. A required namespace other than a built-in one is a project namespace: one an earlier ns form of the program declared, or one whose file on the source path loads when the clause runs -- once per program, again under :reload (Semantics); a file no root holds is an error.