On Sat, Feb 4, 2012 at 9:32 AM, Stuart Halloway
<stuart.hallo...@gmail.com> wrote:
> In clojure's core.clj, assert-args is marked with  ^{:private true}. Why?
> Seems like something that would be useful in any macro definition, not just
> the ones in core.clj...
>
> A similar argument could be made for several of the other couple of dozen
> private names in core.clj. They are not, because "useful" is a much lower
> bar than "core".

That is all fine and good when deciding whether to *add new code to
core* that will have to be maintained, add to load times, etc.

However, when the code in question is *already in core* I don't see
"it's not useful enough to enough users" as a valid reason for not
making it public, which has little added cost (now its API should stay
stable, but by now it's probably mature enough that it is anyway). If
it's generally useful, and its remaining private will just lead to
duplication of functionality as people write their own equivalent
functions and some of these make their way into various libraries,
then it's wasteful, inefficient, and possibly a source of bugs to
*not* make it public. (The "possibly a source of bugs" comes from
people not using the existing, by now well tested version but rolling
their own; also, maintaining two redundant copies of some code can
introduce twice as many bugs down the line.)

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