Fork me on GitHub
#clojure
<
2022-08-15
>
jasonjckn00:08:28

If i always refer to a java class with its fully qualified name, do i still need to add it to ns :import declarations ?

Alex Miller (Clojure team)00:08:36

import just lets you refer to it unqualified

👍 1
vemv09:08:47

IIRC :import had some extra nuance relative to static class initializers, I can be wrong though

Alex Miller (Clojure team)12:08:09

no, import does not load the class

Alex Miller (Clojure team)12:08:32

it just updates the namespace mappings

jpmonettas12:08:04

is there a way of type hinting proxy-super? On this code and `*warn-on-reflection*`:

(proxy [javafx.scene.control.ListCell] []
    (updateItem [item empty?]
      (proxy-super updateItem item empty?)
      )) 
I'm getting call to method updateItem can't be resolved (target class is unknown).

jpmonettas12:08:11

damn, thanks!

jpmonettas12:08:32

hmm but doesn't work on my case :thinking_face:

jpmonettas13:08:48

oh yeah, that may be it

jpmonettas13:08:33

@U2FRKM4TW out of curiosity, what was your approach for finding that comment?

p-himik13:08:31

Full text search for proxy-super in one of my projects that has a lot of dependencies. :)

jpmonettas13:08:47

oh nice, didn't knew about it. Thanks @UE21H2HHD

👍 1
hiredman15:08:08

proxy-super also isn't thread safe, it works by mutating the proxy obiect

Yogesvara Das15:08:44

Is there a way to add a custom error message to spec if a s/def fails?

Drew Verlee15:08:58

I'm not sure about doing this through spec directly, but i think expound allows for this. https://github.com/bhb/expound Expound is what i use for custom human readable errors for spec.

☝️ 1
Drew Verlee15:08:22

malli can probably do this to as it's more a batteries included.

Alex Miller (Clojure team)15:08:20

No, not really. You can provide a custom explain function overall by binding clojure.spec.alpha/explain-out but you're kind of taking over the whole explain printing job then

skylize17:08:34

Is there some Clojurians meta channel I'm not seeing, for discussing the state of this Slack workspace? Or should I just ask a question about that here? or just keep my thoughts myself? or....

p-himik17:08:55

#community-development probably.

dpsutton17:08:09

always happy to hear thoughts.

skylize19:08:01

thanks. see you over there.