Hi,
On Feb 22, 11:55 am, Johnny Kwan <[email protected]> wrote:
> You're absolutely right. I use 'ns and 'sym because that's what all of the
> ns- functions use. I realize now that this is a macro, not a fn... :) I
> would like to make the fact that this is a macro transparent, so that it only
> accepts symbol arguments. The caller shouldn't have to know that this is a
> macro.
Here we go:
(defmacro #^{:private true} use-private
[ns sym]
`(def ~(with-meta (second sym) {:private true}) @(ns-resolve ~ns
~sym)))
Not tested, though, but should come close.
> > Use @#'foo.bar/private-fn. Or...
>
> Thanks!
This feels a little hacky, however.
> That's what I figured, since the few library implementations I've read seem
> to do that. I assume there's a way to remove these namespaces from generated
> docs, so there's at least some obfuscation?
I'd say, that depends on what you use (and how you use it) to generate
the documentation.
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en