On Sep 2, 2008, at 7:32 PM, Rich Hickey wrote:

>> I suggest adding (:load-resources ...) as a supported reference
>> argument for 'ns.
>
> I wonder. It seems in many cases the loaded resources will need
> definitions made by the parent/loadee, in which case you'd want to
> load them at the end of the file.

That's certainly one way to do it. I was thinking that once a lib  
grows enough to warrant separating it into  multiple resources, a  
clean way to tie the whole lib together would be for the root resource  
to prepare the namespace, load other resources in the right order, and  
not do much else.

Even in the case of a lib big enough to be broken into multiple  
subdirectories, it still makes sense for the root resource to load all  
the other resources directly. The only relative paths available are  
namespace-relative--the kind of paths that are natural to use in the  
root resource and less so elsewhere.

The upside of allowing (:load-resources ...) is that under one  
reasonable structuring of things, a tool could determine all the  
namespaces, classes, and (code) resources associated with a lib by  
parsing a single "ns" call.

--Steve


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to