clojure-dev

Issues: https://clojure.atlassian.net/browse/CLJ | Guide: https://insideclojure.org/2015/05/01/contributing-clojure/
2020-11-10T07:31:58.183100Z

Hi,

2020-11-10T07:33:47.184800Z

I found it a bit odd that the 2-arity version of keyword fails on anything else than strings. Now that simple-symbol? and simple-keyword? exist to validate the input, could it relax its input requirement for these two cases? (Granted: this is a very minor oddity, just wondering for my own curiosity)

alexmiller 2020-11-10T13:37:06.187300Z

Relax to support what? Symbols and keywords?

alexmiller 2020-11-10T13:37:22.187800Z

Is there some example where this would be useful?

borkdude 2020-11-10T22:04:21.190300Z

Is this a case of Hyrum's law or is this really supported on purpose? https://github.com/borkdude/sci/issues/440

borkdude 2020-11-10T22:04:46.191Z

I stumbled upon this in real code somewhere

bronsa 2020-11-10T22:08:15.192100Z

I'm not sure, but as an extra datapoint, deftype ignores the namespace segment aswell, and I'm 100% sure somewhere in clojure.core there's code that emits deftypes with clojure.core namespacing (on interface method names)

bronsa 2020-11-10T22:08:52.192400Z

ah yeah, it's defrecord

bronsa 2020-11-10T22:09:56.193100Z

(e.g. it macroexpands to

(deftype* user/x user.x [...] :implements [... ] (clojure.core/entrySet [..] ...) ..)
)

bronsa 2020-11-10T22:10:58.193900Z

so I can imagine real code out there that would break if this behavior was removed from deftype and or extend-type

bronsa 2020-11-10T22:11:24.194300Z

likely a bunch of macros out there that don't do

~'method-name

borkdude 2020-11-10T22:14:27.195200Z

thanks