Random aside, I see the two doc strings for clojure core:
(ns ^{:doc "The core Clojure language."
:author "Rich Hickey"}
clojure.core)
and then later
its updated
(alter-meta! (find-ns 'clojure.core) assoc :doc "Fundamental library of the Clojure language")
Does anyone remember a reason behind this?This is the commit that added it https://github.com/clojure/clojure/commit/21caa3eb5
Here's where the top docstring was added -- later https://github.com/clojure/clojure/commit/76e7c4317
was just typing that up. it says fixes two tickets. i'll look into that in a bit
So the alter-meta!
version came first, in January, then the :doc
/ :author
metadata was added in December. So I guess that reflects how support for metadata and docstrings in namespaces evolved. Interesting to see...
so important its documented twice π
#216 seems to be unrelated -- I guess Stuart was really fixing #217 (and perhaps just didn't notice the alter-meta!
near the bottom?)
Might have had to do with something about autodoc too
There used to be a bug that meta on namespaces would not end up in aot compiles classes
And that affected what autodoc (which relies on loading) could see
That bug was fixed around 1.6
These changes were back in 2009, which is 1.1 / 1.2 time?
(I'm murky on pre-2011 stuff π )
1.0 was May 2009 (after the alter-meta!
change to add ns metadata). 1.1 was December 2009 just after the addition of :doc
/ :author
to all core namespaces.
So I guess my first exposure to Clojure was on 1.1 after all (about May 2010, when I took Amit Rathore's workshop). And the 1.3 pre-release process was longer than I remembered -- we went to production on 1.3 alpha 7 or 8 I think in spring 2011 roughly and the gold release wasn't until September that year. Ah, simpler days... π
but...there's no good reason for the two to be different, right?
Not that I can think of. Jira and patch welcome, I suspect?
I canβt imagine Rich really cares enough to make that worth it
there should be an "Alex Miller says this is trivial" loophole
It only opens for 12 minutes under every 9th full moon
man that sounds like a fun time
"How many tabs will I get to convert to spaces this year???"
I guess it would take longer to agree on which docstring should remain than it would to actually remove that one line (and maybe change the other) π