3 ms·
One (stupid?) thing that annoys me about closure is that native clojure libraries use snake case while java libraries use camel case. You could obviously write
by mruts 7y ago
One (stupid?) thing that annoys me about closure is that native clojure libraries use snake case while java libraries use camel case. You could obviously write a new defn macro to take of all this and make it consistent, but it might have just been a better decision to just make everything camel case, in in Lisp-like fashion.
Also I find Clojure a little dogmatic in regards to mutation, more so than even Scheme. I find Racket to be better designed and more elegant, though currently the performance isn’t as good.
- keymone 7y agoClojure being dogmatic is the reason I love it.
- dkersten 7y agoAgreed. While I don’t always agree with its dogma, without it I don’t think I’d still be using Clojure, yet here I am ten years after first learning it. Clojure is great because it takes a strong stance on how certain things should be done.
- keymone 7y agoyep. also, i think learning how clojure's dogmas synergize with each other is the determining factor in whether one is a clojurist for life or not.
- whalesalad 7y agoThe macro solution is only solving for the aesthetics of the code and is opening the door to infinite edge cases where it wouldn’t work or could have unintended side effects. I don’t disagree with you that it’s ugly and sometimes tedious to use Java in Clojure... but that is one of the foundational strengths of the language. It’s also something that you’re hopefully not doing a lot of... so I think the trade off of seeing ugly Java syntax sprinkled in your project is worthwhile. You’re standing on the shoulders of giants with zero to no penalty as far as interop. I might reframe your mentality to see this as a huge benefit and not something stupid!
- Barrin92 7y ago>Also I find Clojure a little dogmatic in regards to mutation I don't think it's dogmatic (which I would say has a negative connotation) but simply opinionated because fundamentally at the heart of clojure seems to be a concurrency model that heavily relies on immutability to make sense, so it's a logical consequence of that design choice. And I think it's an appropriate one because the mutable thread and lock world that we get in mutable imperative languages is honestly a little bit insane.
- blunte 7y agoI find snake case much less visually noisy. SomeVarLikeThis requires more visual parsing effort for me than some_var_like_this. And when I have used Clojure, I would say less than 1% of my code was doing Java calls - so the occasional CamelCase would stand out visually, helping me notice them.