clojure-dev 2024-02-12

Has a spec for extend-protocol etc ever been considered?

user=> (s/get-spec `extend-protocol)
nil
Mostly interested in stating that the class names must be simple symbols (rather than Class/forName expression, which can go bad: https://clojure.atlassian.net/browse/CLJ-1381) It seems in Clojure 1.12 there's no longer the need to write Class/forName for primitive arrays since we can write byte* etc

No interest I guess then

Hm… a quick search on Ask Clojure suggests the answer to your question is a solid “no”. > We do not plan to add specs for the functions in core. cf. https://ask.clojure.org/index.php/12851/full-specs-for-clojure-core-in-core-specs-alpha?show=12855#a12855

i don't think that's quite accurate, extend-protocol is a macro and there are plenty of specs for clojure.core macros

👍 1

Perhaps @alexmiller just didn't catch this message

Alex Miller (Clojure team) 2024-02-14T13:54:20.485729Z

Put it on ask

Am I correct in thinking that the new Class/member syntax can’t be used to refer to fields?

Previously it could be used for static fields.

Alex Miller (Clojure team) 2024-02-12T22:39:13.344989Z

still is for static fields

Alex Miller (Clojure team) 2024-02-12T22:39:34.644319Z

no change here

Ok, but my question is really whether there are changes to allow MyClass/instanceField - I’m assuming not, but was just clarifying.

Alex Miller (Clojure team) 2024-02-12T22:40:52.092299Z

no

it should be Class/method syntax. If we said Class/member somewhere please point that out

Alex Miller (Clojure team) 2024-02-16T18:59:53.143549Z

The ticket title said that, I’ve updated

👍 1