Why does "use" in Clojure call "in-ns" to return to the original namespace? -
Loads a lib in usage
in the closure and additionally refers to the namespace of Lib .
Load
.
Then what is the purpose of the IN-NS
command to use Liberty
users => ; (Closeor.core / in-ns 'user) (closeor.core / ref' project.core) (use closeor / load "/ project / core") (use "project.core: verbose" )
In other words, (clojure.core / in-ns' user)
is not unnecessary in the previous example?
This does not actually call in-ns
- this " Lineboding verbosli "(this is if you are near : verbose
as the option of usage
) so that you know how the name of reference is named. It will also do that if you need with
as : as
to specify that the location of the name will be created in the alias:
user = & gt; (Clojure.set: as set): verbose (clojure.core / load "/ clojure / set") (clojure.core / in-ns' user) (clojure.core / alias' set 'closure.set)
This is useful when initial load creates more namespaces for recursive loading. For example, here the output is ('[clojure.core.rrb-vector: as fv ]: Verbose is required
(can arguably use the line explanation in
in-ns
line treatment too):
(clojure.core / load "/ clojure / core / rrb_vector") (clojure.core / load "/ clojure / core / rrb_vector / protocol") (clojur E.core / mention 'clojure.core.rrb-vector.protocols: mention' [slicev splicev]) (clojure.core / load "/ clojure / core / rrb_vector / nodes") (clojure.core / see 'closor.core .RRB-Vector.Nodes: '[AIIMS Object-Nm-NM Primitive-Nm Vacant-PV-Node Vacant-GVC-Node]) (Close.comcore / Load "/ Closer / Core / rrb_vector / rrbt") (Clojure .core / mention 'clojure.core.rrb-vector.protocols: mentions' [PSliceableVector slicev PSpliceableVector splicev]) (clojure.core / mention 'clojure.core.rrb-vector.nodes: mention' [overflow limitations? The last distance is to leave the regular-first class child- Left-child left-replace the left-child - Left-child's place-right-right-hair-tail-new-path-direction-vein-object Ect- Nm primitive-nm] (clojure.core / load "/ clojure / core / rrb_vector / transients") (clojure.core / reference 'clojure.core.rrb-vector.nodes: refer' [final range limits]) ( Clojure.core / mention 'clojure.core.rrb-vector.transients: mention' [transient-helper] (clojure.core / load "/ clojure / core / rrb_vector / fork_join") (clojure.core / load "/ closures / Core / reducer ") (closeor.core / In-ns 'closor.core adr.) (Closecore / Area' Walk 'Closer.walk) (Closer.core / in-ns' closor.core.RRB-vector.fork- joining) (clojure. Core / aka 'r' clojure.core.reducers) (clojure.core / in-ns' clojure.core.rrb-vector.rrbt) (clojure.core / aka 'FJ' clojure.core.rrb-vector. Joining fork- (clojure.core / mention 'clojure.core.protocols: mentions' [IKVReduce]) (clojure.core / in-ns' clojure.core.rrb-vector.rrbt) (closeor.core / area 'R' Closer.Cor.Reders (Closer.core / 'closer.core.rends: referee' [Coleford's (Clojure.core / load "/ clojure / core / rrb_vector / inter session") (Clojure.core / 'closeor.core: RRB-Vector.rrbt:' [as-rrbt]) (clojure .core / mentions 'clojure.core.rrb-vector.protocols: mention' [PSliceableVector slicev PSpliceableVector splicev]) (clojure.core / mention 'clojure.core.rrb-vector.rrbt: mention' [as -rrbt] (Clojure.core / in-ns' user) (clojure.core / alias' fv 'clojure.core.rrb-vector)
Here is the relevant piece of source clojure .core / load-lib
(where the printout appears):
;; Closer 1.6.0 (when (and required-NS * loading-verbosley *) (printoff "(closeor.core / in-ns'% s) \ n" (ns-name * ns *)) (when (As a liberalization); (
If you want to check the entire function, see Needs-ns
is a local whose value is (or in the form of an experiment)
- that is true, if any : like
Alias name is specified or due to load a usage .
(source closeor.core / load-lib)
on REP. / P>
Comments
Post a Comment