[CLJ-272] load/ns/require/use overhaul Created: 18/Feb/10 Updated: 28/Feb/12 |
|
| Status: | Open |
| Project: | Clojure |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Backlog |
| Type: | Enhancement | ||
| Reporter: | Anonymous | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 3 |
| Labels: | None | ||
| Description |
|
Creating this ticket to describe various things people have wanted to change about how ns works: Minimal needs
Other possibilities to discuss.
|
| Comments |
| Comment by Assembla Importer [ 24/Aug/10 9:27 AM ] |
|
Converted from http://www.assembla.com/spaces/clojure/tickets/272 |
| Comment by Assembla Importer [ 24/Aug/10 9:27 AM ] |
|
stu said: Suggestions from Volkan Yazici: Hi, I saw your "load/ns/require/use overhaul" ticket[1] and would like to tr/edu/bilkent/cs/retop.clj In retop.clj, I have below ns definition. (ns tr.edu.bilkent.cs.retop And in every .clj file in retop/ directory I have below in-ns in the (in-ns 'tr.edu.bilkent.cs.retop) The problems with the ns decleration are: 1) Most of the :import's in retop.clj only belong to a single .clj file. (tr.edu.bilkent.cs.patoh imports are only used by graph.clj. Yep, I can add an (import ...) 2) See (:load ...) clause in (ns ...) form. There are lots of (:load Also, being able to use wildcards would be awesome. 3) There are inconsistencies between macros and functions. For instance, (ns foo.bar.baz (:use mov)) I'd like to get rid of quotations in both cases. I'm not sure if I'm using the right tools and doing the right approach |
| Comment by Assembla Importer [ 24/Aug/10 9:27 AM ] |
|
stuart.sierra said: My requests: 1. If writing macros that do not evaluate their arguments, provide function versions that do evaluate their arguments. 2. Do not support prefix lists for loading Clojure namespaces. It's hard to parse with external tools. 3. Do not conflate importing Java classes with loading Clojure namespaces. They are fundamentally different operations with different semantics. I have implemented some ideas in a macro called "need" at http://github.com/stuartsierra/need |
| Comment by Stuart Sierra [ 12/Dec/10 4:08 PM ] |
|
Further requests: Permit tools to read the "ns" declaration and statically determine the dependencies of a namespace, without evaluating any code. |
| Comment by Paudi Moriarty [ 28/Feb/12 3:56 AM ] |
This would be great for building OSGi bundles where Bnd is currently not much help. |