Fork me on GitHub
#clojure-dev
<
2020-07-11
>
dpsutton17:07:37

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?

seancorfield17:07:23

Here's where the top docstring was added -- later https://github.com/clojure/clojure/commit/76e7c4317

dpsutton17:07:48

was just typing that up. it says fixes two tickets. i'll look into that in a bit

seancorfield18:07:16

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

dpsutton18:07:46

so important its documented twice πŸ™‚

seancorfield18:07:41

#216 seems to be unrelated -- I guess Stuart was really fixing #217 (and perhaps just didn't notice the alter-meta! near the bottom?)

alexmiller18:07:00

Might have had to do with something about autodoc too

alexmiller18:07:23

There used to be a bug that meta on namespaces would not end up in aot compiles classes

alexmiller18:07:56

And that affected what autodoc (which relies on loading) could see

alexmiller18:07:13

That bug was fixed around 1.6

seancorfield18:07:23

These changes were back in 2009, which is 1.1 / 1.2 time?

seancorfield18:07:38

(I'm murky on pre-2011 stuff πŸ™‚ )

seancorfield18:07:58

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.

seancorfield18:07:34

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... πŸ™‚

gfredericks23:07:23

but...there's no good reason for the two to be different, right?

seancorfield23:07:08

Not that I can think of. Jira and patch welcome, I suspect?

alexmiller23:07:30

I can’t imagine Rich really cares enough to make that worth it

gfredericks23:07:45

there should be an "Alex Miller says this is trivial" loophole

alexmiller23:07:39

It only opens for 12 minutes under every 9th full moon

gfredericks23:07:29

man that sounds like a fun time

gfredericks23:07:13

"How many tabs will I get to convert to spaces this year???"

πŸ‘Ύ 1
seancorfield23:07:36

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) πŸ™‚