Re:Clojure 1.11 planning
by agumonkey on Tuesday October 08, 2019 @12:40PM
(#21194144)
so no Java Function to clojure Function automating mapping ? do people use macros to make it nicer ?
[ Parent
| on HN ]
Not out of the box, probably because java.util.function.Function seems like an afterthought in a strictly object-oriented language while Clojure has first class functions. In practice you don't interop with Java very much, let alone functional Java (as Clojure itself is a much better fit). But if it was useful, it'd be easy to write helpers for converting functions back and forth.
Re:Clojure 1.11 planning
by Uhuhreally on Tuesday October 08, 2019 @12:53PM
(#21194285)
you'd use Clojure not Java for an example like the above
I think the context is when doing interop.
Re:Clojure 1.11 planning
by Uhuhreally on Tuesday October 08, 2019 @02:17PM
(#21195284)
yes but I got the feeling the grandparent was confused so I tried to clarify that the only reason for the verbosity is interop - the Clojure code is much more concise than the Java - the interop code is like listening to a speech being translated between English and Spanish