Re: Clojure namespace conventions
My goodness.. Seems like a can of worms. :p I think I'll pick something at least two levels deep like pauldoo.someproject, complete with .core and .tools as sub namespaces.. On 23 February 2011 20:35, Mark Rathwell mark.rathw...@gmail.com wrote: This discussion has been had multiple times on this list, not sure how much new information you will get. See the following for a couple examples: http://groups.google.com/group/clojure/browse_thread/thread/968e9066223c3a2b/fbce84869dbf4ce6?lnk=gst# http://groups.google.com/group/clojure/browse_thread/thread/78a32eeaacd659e/89304aeec4d00f7d?lnk=gst# On Wed, Feb 23, 2011 at 3:19 PM, Paul Richards paul.richa...@gmail.com wrote: Hi, Is there a guide to the conventions for naming and structuring namespaces in a Clojure project? I see for example that the .core namespace is fairly common in different projects. Is this also where the -main entry point should live? Also is it typical to have code living in someproject as well as someproject.tools, or should the former be promoted to someproject.core? -- Paul Richards @pauldoo -- 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 -- Paul Richards @pauldoo -- 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: Clojure namespace conventions
FWIW, I've settled on cemerick.project-name as my default. I think the project-name.core convention cropped up because of hesitancy of some to use their name at the top level. - Chas On Feb 24, 2011, at 5:48 AM, Paul Richards wrote: My goodness.. Seems like a can of worms. :p I think I'll pick something at least two levels deep like pauldoo.someproject, complete with .core and .tools as sub namespaces.. On 23 February 2011 20:35, Mark Rathwell mark.rathw...@gmail.com wrote: This discussion has been had multiple times on this list, not sure how much new information you will get. See the following for a couple examples: http://groups.google.com/group/clojure/browse_thread/thread/968e9066223c3a2b/fbce84869dbf4ce6?lnk=gst# http://groups.google.com/group/clojure/browse_thread/thread/78a32eeaacd659e/89304aeec4d00f7d?lnk=gst# On Wed, Feb 23, 2011 at 3:19 PM, Paul Richards paul.richa...@gmail.com wrote: Hi, Is there a guide to the conventions for naming and structuring namespaces in a Clojure project? I see for example that the .core namespace is fairly common in different projects. Is this also where the -main entry point should live? Also is it typical to have code living in someproject as well as someproject.tools, or should the former be promoted to someproject.core? -- Paul Richards @pauldoo -- 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 -- Paul Richards @pauldoo -- 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: Clojure namespace conventions
On Feb 24, 2:48 am, Paul Richards paul.richa...@gmail.com wrote: My goodness.. Seems like a can of worms. :p I think I'll pick something at least two levels deep like pauldoo.someproject, complete with .core and .tools as sub namespaces.. IMO adding .core indicates it's a filler segment that's only there to get around the fact that you shouldn't have single-segment namespaces. If you've already got two levels, there's no need for a .core segment. -Phil -- 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: Clojure namespace conventions
2011/2/25 Phil Hagelberg p...@hagelb.org On Feb 24, 2:48 am, Paul Richards paul.richa...@gmail.com wrote: My goodness.. Seems like a can of worms. :p I think I'll pick something at least two levels deep like pauldoo.someproject, complete with .core and .tools as sub namespaces.. IMO adding .core indicates it's a filler segment that's only there to get around the fact that you shouldn't have single-segment namespaces. If you've already got two levels, there's no need for a .core segment. One element to take into consideration : if you want your library to sometimes play well with e.g. OSGi, it would be better to have all of it into its own java package, since OSGi places visibility directives at the package level. Indeed, imagine that in the future you have created 2 useful libraries : pauldoo.project1, and pauldoo.project2. If both are independently released in their artifact (which would also happen to be OSGi bundle), there are 2 possibilities : if pauldoo.project1 is a namespace, and pauldoo.project2 is a namespace, then both artifacts will have content in the package pauldoo, and thus both artifacts will be seen by OSGi as (potentially) exporting the package pauldoo. I'm not an OSGi expert, but this may or may not be embarrassing. To the contrary, if you take care of having each library to not share content in a same package, eg. pauldoo.project1.core et al, then their (potential) export directive will not conflict with each other. Cheers, -- Laurent -- 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
Clojure namespace conventions
Hi, Is there a guide to the conventions for naming and structuring namespaces in a Clojure project? I see for example that the .core namespace is fairly common in different projects. Is this also where the -main entry point should live? Also is it typical to have code living in someproject as well as someproject.tools, or should the former be promoted to someproject.core? -- Paul Richards @pauldoo -- 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: Clojure namespace conventions
This discussion has been had multiple times on this list, not sure how much new information you will get. See the following for a couple examples: http://groups.google.com/group/clojure/browse_thread/thread/968e9066223c3a2b/fbce84869dbf4ce6?lnk=gst# http://groups.google.com/group/clojure/browse_thread/thread/78a32eeaacd659e/89304aeec4d00f7d?lnk=gst# On Wed, Feb 23, 2011 at 3:19 PM, Paul Richards paul.richa...@gmail.comwrote: Hi, Is there a guide to the conventions for naming and structuring namespaces in a Clojure project? I see for example that the .core namespace is fairly common in different projects. Is this also where the -main entry point should live? Also is it typical to have code living in someproject as well as someproject.tools, or should the former be promoted to someproject.core? -- Paul Richards @pauldoo -- 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