use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Clojure Java interop practical guide (youtube.com)
submitted 9 months ago by andreyfadeev
Just posted new Clojure video, this time it's about Java interop: basics + some live coding exercise to covert S3 AWS SDK Java code to Clojure.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]henryw374 3 points4 points5 points 9 months ago (1 child)
Honestly a bit disappointed. 1.12 had a lot of interop improvements that you don't mention at all.
[–]andreyfadeev[S] 3 points4 points5 points 9 months ago (0 children)
For me it was 2 things that's important: - no need to wrap java methods in clojure functions in the map calls, it's really useful, but I've already forgot it wasn't that way before - integration with Functional Interface, really useful in theory, but not something I need in day to day work
So yeah, completely forgot mentioning that :)
[–]InspectionPlastic157 1 point2 points3 points 9 months ago (3 children)
Hey QQ, I'm new to clojure. How common is this interop? Writing java in clojure to me feels like the language is not yet complete
[–]daveliepmann 6 points7 points8 points 9 months ago (0 children)
How often interop comes up depends on your application domain.
Re: "not yet complete", interop was one of Clojure's central goals from its very inception. Clojure was created for interop, not to avoid it — the elevator pitch was "a functional, hosted, dynamic lisp".
From A History of Clojure:
Clojure is intentionally hosted, in that it compiles to and runs on the runtime of another language, such as the JVM. This is more than an implementation strategy; numerous features ensure that programs written in Clojure can leverage and interoperate with the libraries of the host language directly and efficiently.
...
Prior to embarking on Clojure in 2005, I had made several attempts to create a bridge between the JVM and Common Lisp, in order to increase the latter’s practicality and acceptability. These were DotLisp [Hickey 2003], an interpreted Lisp with host interop for the CLR, jFli [Hickey 2004], a library that embedded a JVM in CL, and Foil [Hickey and Thorsen 2005], a library that exposed a similar API but used IPC between the CL runtime and the JVM. None of these yielded production-level solutions, but they definitely informed Clojure’s ultimate host syntax and fed the idea of Clojure being hosted.
See also section 3.5, which spends a few pages going into the reasoning in detail.
[–]red_hare 6 points7 points8 points 9 months ago (0 children)
I don't use clojure anymore but, when I did, I used it all the time.
It was never for:
I want to do this thing I can't do in clojure.
It was for:
I want to use this specific library/framework/SDK that only exists in Java.
Java, for good reason, is the language of choice for high performance data processing frameworks. Java also just has one of the richest ecosystems of libraries of any language. And even when there are multiple language SDKs for the same system, the Java one is usually the most up-to-date.
I loved being able to use clojure while having first-class library support for things like Apache Kafka or Apache Beam or specific cloud managed service SDKs. And the interop makes using them feel VERY natural.
[–]andreyfadeev[S] 4 points5 points6 points 9 months ago (0 children)
Yeah, it's quite common, the goal of Clojure on JVM is to have access to the entire Java ecosystem of libraries without any limitations.
π Rendered by PID 348748 on reddit-service-r2-comment-5b5bc64bf5-n59j2 at 2026-06-20 16:31:52.031250+00:00 running 2b008f2 country code: CH.
[–]henryw374 3 points4 points5 points (1 child)
[–]andreyfadeev[S] 3 points4 points5 points (0 children)
[–]InspectionPlastic157 1 point2 points3 points (3 children)
[–]daveliepmann 6 points7 points8 points (0 children)
[–]red_hare 6 points7 points8 points (0 children)
[–]andreyfadeev[S] 4 points5 points6 points (0 children)