7 ms·
Totally agree, functional programming, and certainly the kind of programming you do with clojure, can get just as messy and far away from your goals as object o
by hellofunk 7y ago
Totally agree, functional programming, and certainly the kind of programming you do with clojure, can get just as messy and far away from your goals as object oriented code.
Clear, organized, well-architected code, in any language, is the skill that takes a long time to develop. I do not personally find clojure makes this any easier than in any language.
- iLemming 7y ago> I do not personally find clojure makes this any easier than in any language. Surprisingly, it does for me. After using many different languages, I find myself more productive in Clojure than in any other language I have used before. Every language I used before Clojure left a dent in my mental ability to appreciate what I do. It's not a single favorite PL of mine, but most other programming languages make me feel bored and not interested after a year or so of using them. They have so many inconsistencies and quirks that you slowly succumb to the inevitable - you become a hostage. Your language of choice becomes your mental prison. Your hobby becomes this thing where you dig up yet some another poorly documented inconsistency and brag about it to your colleagues and friends. You become an expert from burning too often and too much. The language becomes your identity because you've seen too many ugly parts of it. You have no idea how many times I had to fight my anxiety and depression and seriously thought about leaving the field for good. Learning Clojure has liberated me; it allowed me to maintain focus and put in use all the good things and patterns I learned over the years. In other languages, sometimes you have to bend over backwards to create something clean. Sometimes you have to build this colossal cathedral that requires enormous scaffolding just to hold its own weight, and you can't even remove the scaffolding, and you call that "an elegant solution."
- tomp 7y agoI'm a Programming Language enthusiast, currently making my own language. I'm really curious what makes Clojure different - it's pretty much the most loved language among its proponents (i.e. people love e.g. Rust and Go as well, but not as much as those who love Clojure, love Clojure). Is there any very Clojure-y code you can point to, that would showcase it? Is it just the libraries - collections, concurrency primitives - that could be replicated in another language? It's can be just homoiconicity, as that's just Lisp, but it could definitely be a big part of it... Do you have any ideas what any other language (e.g. Python, TypeScript, Go, Rust, Julia, Haskell, OCaml) would need to change to make you as productive as Clojure?
- fnordsensei 7y agoSince there are many answers already, I won’t elaborate too much. I just want to emphasize one thing: people mention immutable data structures as a default a lot, and sure, they’re great. However, someone might turn around and say, “well, I can pull in a lib with immutable data structures in $lang if I want to.” It needs to be highlighted that the real game changer is an /ecosystem of libraries/ built entirely out of immutable data structures. That’s not something that can be engineered as needed.
- biggidywiggidy 7y agoIt's not one thing. It's many, many things. Each one, on their own, is good, but not a game changer. It's how they all come together in a consistent, well designed whole. This union is idiomatic. Sure you can do all this stuff in other ways, elsewhere. But there is so much ceremony. Clojure is opinionated in a good way that makes nice things succinct and idiomatic. So you will get many different answers. They are all true. And they all come together. The whole is very much greater than the sum of the parts.
- yonki 7y agoI have started programming when I was about 13-14, so it's half of my life now. Honestly, I never wanted to be a programmer. More of a writer/speaker/culture animator. I found Clojure in my first years of learning programming and, from start, it felt, like the only language that was really thought through, before creation. Clojure is the best because its syntax (or lack of thereof) along with data structures, namespaced keywords, specs, and whatnot, allows me to think properly. No other language gives me tools to think so clearly and plainly. I spent lot of time with JavaScript, some Python, some Ruby, a bit of Haskell. None of those really cares about giving you proper tools to think. When I need to use a language different than Clojure it's a burden now because I still think in Clojure. Or: I try to analyze and build a model of my domain without thinking about computers. The best programming language for that is Clojure. Other languages make you think about computers and, for me, that's waisted time
- hindol_adhya 7y agoI am not an expert Clojurist (yet) but I really love Clojure because it gets out of the way like Python but with the performance of Java. Almost all of the boilerplate is gone, and yes, static types next to each variable feels like boilerplate to me after doing enough Clojure. Plus Clojure Core Teams laser focus on API stability makes 10 year old (and even unmaintained) libraries to just work. I have not come across a code snippet so far that did not work because of a breaking change, not saying they are not there, but I did not find it.