This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-12
Channels
- # announcements (2)
- # beginners (104)
- # cider (2)
- # cljs-dev (26)
- # cljsrn (1)
- # clojure (125)
- # clojure-dev (27)
- # clojure-italy (24)
- # clojure-nl (24)
- # clojure-russia (4)
- # clojure-spec (10)
- # clojure-uk (83)
- # clojurescript (18)
- # code-reviews (102)
- # community-development (14)
- # core-async (18)
- # cryogen (11)
- # cursive (15)
- # datomic (16)
- # emacs (6)
- # figwheel-main (6)
- # fulcro (142)
- # graphql (5)
- # jobs (5)
- # jobs-discuss (18)
- # kaocha (1)
- # keechma (1)
- # leiningen (20)
- # luminus (1)
- # mount (5)
- # pedestal (4)
- # reagent (17)
- # reitit (8)
- # shadow-cljs (29)
- # tools-deps (19)
- # vim (108)
Ooh I found a good mystery https://github.com/clojure/clojure/blob/a1722cf9a15d917ee78a117732cf5c5e01fe3557/src/clj/clojure/core.clj#L6743 Why doesn't this line have the effect it looks like it has?
To me, the effect that it looks like it has is to add a :doc
key to the metadata of namespace clojure.core
. Are you saying it does not have that effect?
Because in a Clojure 1.9.0 repl, I see that string value for the :doc
key of (meta (the-ns 'clojure.core))
hmm okay I see that too so now the question is what's wrong with this other repl I guess
wow I definitely had a repl that started off with the other docstring, and now I can't reproduce that state
I was definitely messing around with require
and stuff, but I can't think of how that might have happened
¯\(ツ)/¯
but anyhow I hope we can all agree that it's pretty weird that clojure.core
's docstring appears on line 6743
Bootstrapping ns is weird
There was an old bug that broke ns meta in aot
But that was fixed several releases ago
The really weird thing is that the ns line at the beginning of core works at all (before we’ve defined ns or defmacro or ... anything)
bootstrapping ns is extremely strange and begs lots of questions about the what belongs where
RT
's static
section has the weirdest stuff in it
it doesn't do a whole lot; one of the things it does is set metadata on #'*agent*
final static IFn bootNamespace = new AFn(){
public Object invoke(Object __form, Object __env,Object arg1) {
Symbol nsname = (Symbol) arg1;
Namespace ns = Namespace.findOrCreate(nsname);
CURRENT_NS.set(ns);
return ns;
}
};
the docstring at the top of core.clj
is given as metadata on the symbol rather than the normal way, which is why this IFn
only needs three args
and it clearly ignores the metadata on the symbol
so clojure.core
should have no docstring before line 6743
I want to work on a solution for https://dev.clojure.org/jira/browse/CLJ-440, but before I delve too deep I would like to understand the core team’s position a bit more
my understanding is that the the objections so far have been more about the proposed solutions rather than the validity of the problem itself?
is there still interest for a patch to this, if that patch addresses all the concerns already mentioned in the issue?
Cleaner Java interop around varargs would be great, imo
if we can find a path that feels like idiomatic Clojure and does not leave ambiguity around the various cases
methodical and exhaustive analysis appreciated :)