Fork me on GitHub
#gratitude
<
2024-04-30
>
danielneal14:04:50

Grateful to the core team for what looks like careful and considered work on the new java interop functionality! Excited to peel off some layers of indirection around when using java libraries

gratitude 14
mogverse06:05:43

@U051H1KL1 What are these new interop functionality? We are on a little older version in production. Would like to know what are you referring to!

danielneal08:05:26

I’m not sure how much of this you’ve seen, but see https://clojure.org/news/2024/04/28/clojure-1-12-alpha10 under Method Values. It think it’s been evolving a bit through the development of 1.12 but I think the basic gist is that you can use java instance and static methods in value positions. So instead of having to wrap all the time e.g. (map #(SomeJava/method %) coll)) you can use the java method directly (map SomeJava/method coll), and the java methods can be passed around like a clojure value cans. Also when the method is overloaded, there’s a new way “param-tags” of selecting which overload you would like. I may have got some details wrong here but I hope that’s useful !

❤️ 1
mogverse09:05:36

wow. I was just ranting about not being able to do this in Java interop.