首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > 对于Clojure语言增强命名空间管理

对于Clojure语言增强命名空间管理

  • 资源大小:8.08 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: Clojure

资 源 简 介

A typical situation in a Clojure project is that several namespaces start with the same combination of use-require-import, or at least have much of these references to the outside world in common. However, Clojure currently has no way to define a combination of external references once and then re-use and extend it in individual namespaces. Nstools is an attempt to provide a solution: it permits any namespace to serve as a template for constructing other namespaces. An enhanced version of the ns macro adds the clauses "like", "clone" and "remove". Suppose you have a namespace foo that serves as the template: (ns foo (:use [clojure.contrib.monads :exclude (cont-m)]) (:require [clojure.contrib.seq :as su]) (:import (java.io InputStream))) You can then create a namespace bar and make it "like foo". This takes over all the references created by the use, require, and import clauses in
VIP VIP
0.181174s