clojure-dev

seancorfield 2023-03-09T18:16:03.192579Z

What's the status of work on the Java interop sugar around functional interfaces these days? @ghadi @alexmiller

seancorfield 2023-03-09T18:18:04.760979Z

I found https://clojure.atlassian.net/browse/CLJ-2637 but there were earlier issues too, yes?

seancorfield 2023-03-09T18:18:49.348229Z

Ah, https://clojure.atlassian.net/browse/CLJ-2365 is another

seancorfield 2023-03-09T18:20:21.229329Z

I ask because the topic came up in a thread in #clojure-europe about a company rewriting a Clojure codebase to Java and someone said with the increase in use of functional interfaces in Java libraries, interop from Clojure was getting harder...

niwinz 2023-03-09T18:22:41.901989Z

+1

Alex Miller (Clojure team) 2023-03-09T18:22:46.988849Z

Still in the 1.12 queue

👍🏻 1
ghadi 2023-03-09T18:30:13.510109Z

i sympathize that there is more use of functional interfaces in the wild than before, and that I'd like to see some sort of assistance in to core... ...that being said...

ghadi 2023-03-09T18:30:36.100739Z

we all have macros, and interop is usually isolated to a boundary

2023-03-10T17:16:34.179779Z

I don't buy that it is actually getting harder with the addition of functional interfaces, because when things were written in java without functional interfaces you got lots of bespoke interfaces for function like stuff, in both cases you have an interface (a Function or some bespoke project thing) and you just reify it

1
2023-03-10T17:17:24.461739Z

if anything java providing an official set of interfaces means you can write a single adapter from clojure fns to each of those and reuse those adapters everywhere

Alex Miller (Clojure team) 2023-03-10T17:17:37.529929Z

which is one of the options we're considering

2023-03-10T17:18:49.089949Z

I suspect it "feels" harder because it seems like a 1:1 mapping from clojure fns to java functional interfaces should already exist, whereas if it was lots of bespoke little interfaces of course you just have to reify them