Fork me on GitHub
#clojure-dev
<
2023-03-09
>
seancorfield18:03:03

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

seancorfield18:03:04

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

seancorfield18:03:21

I ask because the topic came up in a thread in #CBJ5CGE0G 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...

Alex Miller (Clojure team)18:03:46

Still in the 1.12 queue

2
ghadi18:03:13

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...

hiredman17:03:34

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

2
hiredman17:03:24

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)17:03:37

which is one of the options we're considering

hiredman17:03:49

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