namespaces-reference: ns vs in-ns
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- clojure
- Domain
- documentation
Research direction
Start with the namespaces reference at https://clojure.org/reference/namespaces, especially the first section and third paragraph. Compare the documented uses of ns and in-ns, then clarify the rationale for recommending in-ns at the REPL; done means the wording answers why it is preferred.
Written by the indexing model from the issue text.
Description
Reading https://clojure.org/reference/namespaces I was a bit surprised how it describes setting up a namespace when REPL-ing (first section, third paragraph):
The best way to set up a new namespace at the top of a Clojure source file is to use the ns macro.
...
At the Repl it's best to use in-ns, in which case the new namespace will contain mappings only for the classnames in java.lang. In order to access the names from the clojure.core namespace you must execute (clojure.core/refer 'clojure.core).
What’s the rationale behind the it's best to use in-ns?
However nice to read what ns does behind the scenes to turn a ‘bare’ namespace into something ‘useable’, it’s not something that seems to be better than ns ?
- Dominant language
- HTML
- Stars
- 259
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from clojure/clojure-site
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
clojure/clojure-site#723 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
clojure/clojure-site#538 · 3 comments ·
-
help wanted
Difficulty 1/5 Under an hour Newbie friendliness 62/100
clojure/clojure-site#386 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
clojure/clojure-site#715 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
clojure/clojure-site#713 ·
All issues in clojure/clojure-site
Similar issues
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
feature pydanty:is-working
Difficulty 1/5 Under an hour Newbie friendliness 88/100
pydantic/pydantic-ai#8647 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
:watch: Not Triaged dotnet-fsharp/svc
Difficulty 1/5 Under an hour Newbie friendliness 90/100