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

Reply via email to