Fork me on GitHub

Ever possible that defrecord would support namespaced keys? I hope the answer is no.


it allows them, but not as fields, only as keys

(ins)user=> (defrecord Foo [a b])
(ins)user=> (-> (->Foo 1 2) (assoc :bar/baz 'x))
#user.Foo{:a 1, :b 2, :bar/baz x}
but I'm sure that's what you meant


@devn I think it's been raised as an idea before.

Ben Sless08:11:03

Question regarding :inline meta and definline I recall reading Alex's comment in one Reddit discussion where he mentioned inlining should not be used or relied upon, and should be considered experimental. • Why? It's been around forever by now. Has any feature been deprecated after so long? • Are there some plans for the future of inlining?


The docstring for it has said it is experimental since it was added, the experiment may end

Ben Sless09:11:26

That's for definline, I don't recall seeing that mentioned for inline meta


I don't know anything about plans, but rich has fiddled with a number of different "optimized linking" approaches over the years, which you could sort of kind of categorize definline with


definline, const, static, and direct


const is basically definline for values instead of functions


Static linking is, I think, completely disabled in the compiler, but the annotations for it are still in core.clj


Direct linking is the replacement for static linking


And this is all stuff at the clojure compiler level, which outputs jvm byte code, which then the jit compiles


The jit is where all the real inlining happens, the clojure compiler just tries make its job easier

Alex Miller (Clojure team)14:11:06

Rich does have some ideas on an alternative to definline but it has never risen up to a high enough priority to explore it