namespaces-reference: ns vs in-ns
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- clojure
调研方向
从 https://clojure.org/reference/namespaces 中的 namespaces 参考文档开始,重点阅读第一节和第三段。比较文档中对 ns 和 in-ns 的用法说明,然后阐明为什么建议在 REPL 中使用 in-ns;当措辞能够回答为什么更偏好它时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
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 ?
- 主要语言
- HTML
- 星标
- 259
- 派生
- 275
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
clojure/clojure-site 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
clojure/clojure-site#723 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
clojure/clojure-site#538 · 3 条评论 ·
-
help wanted
难度 1/5 1 小时以内 新手友好度 62/100
clojure/clojure-site#386 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 55/100
clojure/clojure-site#715 ·
-
难度 5/5 一周以上 新手友好度 25/100
clojure/clojure-site#713 ·
查看 clojure/clojure-site 的全部 Issue
相似的 Issue
-
Crush 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
catppuccin/catppuccin#3125 ·
-
automated issue report
难度 1/5 1 小时以内 新手友好度 95/100
-
难度 1/5 1 小时以内 新手友好度 90/100
VoltAgent/awesome-design-md#469 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
KhronosGroup/glTF#2648 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
sccn/sccn.github.io#108 ·