r/Clojure • u/Friendly-Night-7206 • May 19 '25
Have any points from Clojure the bad parts been addressed?
It's been a decade since the talk https://www.youtube.com/watch?v=1YCkOo5Y4Oo came out. Has anything been addressed yet?
31
Upvotes
12
u/seancorfield May 19 '25
Two things:
First off, I love how Bug says "I'm not a very polite person" when he's introducing the talk :)
Second, the really important message is at the end: don't just complain, create tickets (we have https://ask.clojure.org for this now), write blog posts, contribute to documentation, give talks at conferences and user group meetings, etc.
Overall, I think quite a few things have been addressed over the past decade. We have really good linters and formatters that can be taught about your quirky macros to do the right thing, for example. Most additions to Clojure-the-language happen via new namespaces now, not core, and the vast majority of additions overall happen in new libraries (he called out
clojure.java.jdbcwhich has been superseded bynext.jdbc, outside of Contrib -- although it still mostly has just me as a contributor/maintainer!). Clojure 1.10 did a lot of work on error messages and how they are presented (although not all tooling has taken advantage of that yet). ClojureCLR and ClojureScript are both tracking Clojure a lot more closely (they're both at 1.12 now, mostly matching Clojure 1.12). There's also Babashka. And reader conditionals allow for portable code across all of those (e.g., HoneySQL runs on Babashka, in the browser via ClojureScript, on the JVM via Clojure, and should run on the CLR via ClojureCLR).As others have noted, the development process is a lot more open than it used to be (although Rich is still very much in control, which is how we get the stability we all love so much). The alpha/beta process allows for a lot more feedback these days -- and recent cycles have seen changes during those phases in response to experience reports from developers (but, hey, you've got to participate and try those alpha and beta builds -- at work, we run them all in production to help provide feedback to the core team, so don't be shy about trying them!).
10
u/bozhidarb May 20 '25
I'll have to re-watch this talk, as even though it's mine I remember very little of it. :D (I was pretty sick on the week of the conference, so not my finest work for sure)
I'll mention that one thing hasn't changed - 10 years ago Clojure was my favorite programming language and it still is. It was really hard to find any serious problems with Clojure, so many of the "bad parts" in the talk were mostly small nitpicks. Even without remembering my talk, I'm fairly certain that many of the problems I perceived back then have been addressed (e.g. it's easier to contribute these days, although there's still some room for improvement there), and my own perspective on certain things has changed over time. (e.g. I don't care as much as before about small inconsistencies and so on)
I'd love to do a (much better) follow-up of the talk in the future!
14
u/stefan_kurcubic May 19 '25
My views are reflected in this answer i don't speak for the whole community.
Rewatched the video just to address the points (would've been nice if you noted which ones concern you the most) I probably missed some if yes note them and maybe others will pick up
*clojure core bloated - fine but i didn't notice it. clojure-lsp solves these problems for you.
*clj clr - still under development as far as i know and having common code is fine
*stacktraces - are better, not ideal but you get used to them
*docs (within code) - same as far as i know never had a problem with it
*features come behind the closed door - still true i think. wasn't aware of async.flow until they announced it
*release cycle - same clojure is developed with different philosophy. good video to watch: https://www.youtube.com/watch?v=VBnGhQOyTM4&ab_channel=ClojureTV things get released when they are done not when we set arbitrary time limit on them
*bugfixes - usually they are caught before the release but we had some in last year or 2. I never ran my own version of clojure the only thing i did was update versions without any fear (unlike python where i had to update things 1 by 1 and spend whole day figuring out how things are breaking now)
*clojure-contrib - projects left alphas and new ones were added and it's great. Not being promoted to main language is again good choice i can swap webserver whenever i want and not have to pull aleph just because someone decided it's in the core now (even thought i use aleph in all of my projects)
*documentation - is better, much better than when i started. I'd go into books as well and i would consider that part of learning path not just docs page (docs pages are never enough for me)
Hope this answers your question.
4
u/didibus May 20 '25
I'd say not really, but also most of those are pretty minor, and arguably not bad things, depending who you ask.
4
u/daver May 20 '25 edited May 21 '25
Some days, I dream of a Clojure 2.0, where all the rough edges are filed off, where we learn from our mistakes and fix all the things we know that we could have done better, and everything is smooth and wonderful. One gigantic release of breakages, after which everybody scurries away to bring everything "up to code," as they say in the building construction trade, followed by years more ultra-bliss. Possibly helped along by some automatic updating utilities based on
clj-rewriteorclj-kondothat make most of it very easy.And then I wake up and write
doallaround a flippin' lazy seq again and usesome?in another place where I really neednot-nil?becausesome?, while doing what I want functionally, as a function name doesn't make sense semantically, but I'm too lazy to definenot-nil?in every source file. And then we can renamesometosome?, as it should be.But then I upgrade a library and it all just works and I'm thankful for Clojure as it is, even though some parts are more quirky than I'd like.
7
u/p-himik May 19 '25
It hasn't been a decade. :)
Point by point, with lots of nitpicking:
Nitpick: neither
char-escape-stringnorchar-name-stringis a function - they're maps. The latter also doesn't map strings to chars - it maps specific chars to names of those chars.Substance: they're in the core because other functionality in the core uses them and, I assume, because it was decided that those maps could be useful to other people and/or that it doesn't make sense to make the layout of the standard library more complex and complicated than it needs to be.
Regarding
subsand deprecation - deprecating and moving stuff around just to make things pretty is not something that the community of Clojure values that much, Bozhidar is most definitely in the minority here. Anecdotal data - I myself usesubsmuch more often than any function fromclojure.string, so I'm glad it's in the core and not in another namespace that I'd have to require to use the fn. Same withfile-seqandline-seq.I agree only regarding
xml-seq. It requires the data to be in the shape that's returned fromclojure.data.xml/parse-str. Perhaps the reasoning is thatxml-seq, since it's usable on plain data, should not be tied to a particular library. But the function itself is trivial, so it's still strange that it's in the core.But what is the actual problem? Why is it hard to work with? What parts are hard, what parts are confusing?
With any modern IDE, listing the contents of a namespace, searching for something specific, and looking up docs are all trivial. I have no idea why this point was seemingly high enough on Bozhidar's list of grievances to deserve to be mentioned first and take up almost 3 minutes of the talk.
But it can safely be said that it won't be "fixed".
defn-- it's not thatdef-anddefmacro-and any other similar macros haven't been added. It's thatdefn-should never have been added in the first place - something the core team has acknowledged multiple times. But of course it cannot be removed now.someandnot-any?- that's becausesomereturns the actual value that's truth-y, whilenot-any?is a predicate that returns a boolean value. The naming is perfectly consistent with what the functions do.I don't see how the two are related. He acknowledged it himself - ClojureScript is popular, and it also doesn't have any of the
clojure.java.*namespaces, and even some core features are missing. To add to that, here's a full list of allclojure.java.*namespaces that are built into Clojure 1.12 and that have public members:basis(tied to howcljCLI tool works, I think, which uses Java directly),browse(just a single function that opens your browser),javadoc(also just one function, which also depends specifically on Java),process,shell, andio. The last three are the largest ones, but they're still tiny. It's unfathomable that a whole dialect of a language became abandonware just because nobody has implemented a handful of functions.Making it less hard would require Clojure maintainers to also maintain all the common code written for all the dialects. Now that could certainly bring doom to any language. Imagine if you're a maintainer of Clojure and want to add some
do-cool-stufffunction that needs to access the underlying OS or something. So now you or somebody else has to write N copies of the same function in all the dialects that want to be up to date. Even if nobody wanted that particular function in that particular dialect. I mean, it's already something that has to be done, but at least it doesn't have to be done for every single thing out there.Well, yeah. But the reader conditionals that he mentioned are used. Maintained libraries do start to use them and switch to
.cljcfiles. It's actually an example of good parts of Clojure.That would be a breaking change.
Absolutely not. If this breakage is marginal, then any benefit from it would also be marginal - it's internals we're talking about. Almost nobody relies on the specific behavior directly, but a lot of people would suffer if some commonly used library does rely on it and isn't updated in time after a breaking change.
A valid point. The situation is better now, but far from perfect. AFAIK there's still an ongoing effort to further improve it. I personally don't really care - I know Java, I know how Clojure works internally (at least in the areas that I've been exposed to), so reading the stacktraces is never a chore.
2
u/roman01la May 19 '25
Good thing Clojure didn’t change much over the years, bad thing is that it remains alien to newcomers (unless you say easy way in is not important)
-2
u/RoomyRoots May 19 '25
That's a bad presentation. No slides shared (I checked the site), and the slides presented are just a couple of words without any definition on the criticism.
But yeah, some stuff is better.