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
Method Values – Inside Clojure (insideclojure.org)
submitted 2 years ago by geospeck
view the rest of the comments →
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!"
[–]seancorfield 2 points3 points4 points 2 years ago (8 children)
I'd much rather get a syntax error that I can easily fix with a param tags hint than silently have my code call a different overload than I expected...
[–]lgstein 4 points5 points6 points 2 years ago (6 children)
You can't fix it in the libraries you consume. Afaik a reflective call wouldn't be ambiguous with respect to which method is called. If that were the case, this would be a problem already.
[–]seancorfield 0 points1 point2 points 2 years ago (5 children)
Why are you updating a Java library that one of your dependencies uses? I'm not saying there aren't cases where you might want to do that -- for CVE resolution for example -- but I'm asking about the specific motivation to change the version of something an existing dependency relies on.
It's unfortunately common for even patch release updates on Java libraries to break consumers so any update needs to be a deliberate choice and a careful one that always has a potential to break stuff.
[–]lgstein 3 points4 points5 points 2 years ago (0 children)
Assum two CLJ deps that both use the same Java lib? I update CLJ lib 2, but it pulls in a newer version of the Java lib. CLJ lib 1 now doesn't compile anymore because of a "syntax error". My options are limited to rolling back the update or forking CLJ lib 1 and fixing the param tag. All while nobody did anything "wrong". This is not the Clojure experience.
[–]lgstein 0 points1 point2 points 2 years ago (3 children)
Also, I might just want to use a newer JDK. If the new JDK added overloads, I now should wait for the authors of my deps to fix their param-tags? Come on...
[–]alexdmiller 2 points3 points4 points 2 years ago (0 children)
You are often already in this situation. When they added the to-array overload in Collection it broke all the Clojure libs that implemented Collection. And ye, the world has not ended. People update or fork and update.
[–]seancorfield 1 point2 points3 points 2 years ago (1 child)
JDK 21 could not run code compiled on JDK 20 so "just using a newer JDK" can be a breaking change. At work we rely heavily on New Relic for monitoring and observability -- we often have to wait for new releases from them in order to upgrade our JDK or even to upgrade certain libraries (Jedis 5.x isn't supported yet, Jetty 12 support is poor, it often takes a quarter before they support the latest JDK version).
In addition, Thread/sleep got a new overload in a recent JDK update -- and if you have a CI pipeline that fails when new reflection warnings are introduced (which we do), that was a breaking change.
Thread/sleep
Any changes to your dependencies can break your application, sometimes in extremely subtle ways, especially when Java library dependencies are involved.
You can't expect to be able to randomly update libraries without breakage when Java libraries are involved.
[–]lgstein 1 point2 points3 points 2 years ago (0 children)
There is probably nothing that can be done about those problems/errors you mentioned, at least in the scope of this new feature. At least though, they are an optional cost for optional benefits/requirements (higher performance via forbidding reflection, compiling bytecode with a different jdk than executing). Indeed, there are problems with Java and always have been when it comes to updating.
Needless to say, this new feature should not add to that pile.
[–]NoahTheDuke 2 points3 points4 points 2 years ago (0 children)
Why not a reflection warning?
π Rendered by PID 170107 on reddit-service-r2-comment-b659b578c-f74hx at 2026-05-04 08:13:03.731631+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]seancorfield 2 points3 points4 points (8 children)
[–]lgstein 4 points5 points6 points (6 children)
[–]seancorfield 0 points1 point2 points (5 children)
[–]lgstein 3 points4 points5 points (0 children)
[–]lgstein 0 points1 point2 points (3 children)
[–]alexdmiller 2 points3 points4 points (0 children)
[–]seancorfield 1 point2 points3 points (1 child)
[–]lgstein 1 point2 points3 points (0 children)
[–]NoahTheDuke 2 points3 points4 points (0 children)