On Mar 5, 6:24 am, jon <
superuser...@googlemail.com> wrote:
> Hi, I'm still curious what the current "official guidelines" & future
> clojure plans are regarding:
> * namespace names containing '/'
> and the related issue of
> * symbols containing '.' (which can be defined, but not used without
> being qualified because of the clash with java class names. see
> below.)
>
> - Should both of these simply be avoided everywhere?
Yes.
> - Are hierarchical namespaces of any practical value?
Could be, but most of the time it's just a convention for the
formatting of the prefix part of a 2-part identifier. Java goes
further to consider the parts to have relationships to the file system
hierarchy - not everyone likes that.
> - Might they come in a future release?
Probably not formally.
> - If in java, namespaces are arranged like "javax.security.auth",
> "javax.sound.midi", should clojure coders be emulating something like
> that with a namespace naming scheme like "mystuff--security--auth",
> "mystuff--sound--midi", or is using '.' as separator safe for this
> usage?
>
Don't use '.' or '/'. You can just say dash. e.g. org-my-ns, if you
like.
I expect to add ns aliases at some point, to make long namespace names
viable.
As the reader docs say, "Symbols begin with a non-numeric character
and can contain alphanumeric characters and *, +, !, -, _, and ?", and
clearly state the special interpretation of '.' and '/'. I would stick
to that. Note (as you have) that not everything that is disallowed is
enforced at this time. It's worth following the rules even if you are
not getting caught :)
Rich