Re: Will clojurescript get in-ns and load?
I am going to bump this topic just once to see if there are any further opinions. I think that this would be a very useful capability. I think that in-ns and load are one solution to modularity, in particular to facilitate separating code effectively into portable chunks. My motivation is to be able to separate generically reusable, jvm and closurescript specific code. But, still be able to compile back into a unified namespace which includes functions that have both generic and specific implementations. The key requirements are: 1. The ability to break a single logical namespace into several distinct files and then merge these files back into a single namespace. In clojure I do this with in-ns and load. 2. To do this consistently across clojure dialects (jvm, clojurescript and clr) It is not important whether this is seen to be a runtime load or a compile time load. I think Compile time loading would be sufficient (and necessary for clojurescript as pointed out above). I appreciate that there may be other more pressing issues. I hope everyone who went enjoyed the conj. I would have liked to be there. Maybe next year... Cheers Dave -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Will clojurescript get in-ns and load?
Good point. Let me change the question slightly, Is there a compile time capability that will allow namespaces to be split across several files and merged. Thereby achieving the equivalent of in-ns and load? Basically, I would like to have a namespace where some functions are defined in a different file/location. (The practical use being to allow both jvm and clojurescript implementations of the same api) Dave -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Will clojurescript get in-ns and load?
Thinking further, the capability would not be of use (to me) if it were not consistent/indistinguishable across clojure and clojurescript. I have seen in-ns and load used to effectively split a namespace across files If 'in-ns' and 'load' were implemented for clojurescript, could 'load' be managed as a compile time operation to merge the namespaces. Perhaps there are better ways of achieving this that I am not aware of. Cheers D -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Will clojurescript get in-ns and load?
There is a load-file function in clojurescript, I'm guessing that doesn't do what you want? Scott On Thu, Oct 20, 2011 at 1:07 PM, Dave Sann daves...@gmail.com wrote: Thinking further, the capability would not be of use (to me) if it were not consistent/indistinguishable across clojure and clojurescript. I have seen in-ns and load used to effectively split a namespace across files If 'in-ns' and 'load' were implemented for clojurescript, could 'load' be managed as a compile time operation to merge the namespaces. Perhaps there are better ways of achieving this that I am not aware of. Cheers D -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Will clojurescript get in-ns and load?
It's not likely, because namespaces do not exist at runtime in ClojureScript. What would `load` do in a browser? -S -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Will clojurescript get in-ns and load?
Is it planned for clojurescript to get *in-ns* and *load*. These would be most useful for code modularisation (see thread Reuse of generic Clojure/ClojureScript code?) Cheers Dave -- 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en