John Harrop wrote:
> I think we need some notion of semi-private as well. It would be ignored 
> by :use and by automation like tab-completion of symbols, doc 
> generation, and the like (except it would show in tab-completion inside 
> of its namespace) but would not actually be illegal to invoke from 
> elsewhere. So, it would be like private in every respect except for 
> invokability.

I'd tentatively agree.  Although perhaps another model would be to just 
put your semi-private declarations in a different namespace which is not 
normally :use'd.

If you're really desperate you can get around the exception like this:

user> (apples/foo 4)

var: #'apples/foo is not public
   [Thrown class java.lang.IllegalStateException]

user> (defmacro reveal [sym]
          `(deref ~(clojure.lang.Compiler/resolveIn *ns* sym true)))

user> ((reveal apples/foo) 4)

But that's no doubt a bad idea.

--~--~---------~--~----~------------~-------~--~----~
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