3 ms·
I've worked with Java for over a decade professionally. Most of the verbosity in it is just noise, and does not provide any meaningful information. Clojure cod
by yogthos 8y ago
I've worked with Java for over a decade professionally. Most of the verbosity in it is just noise, and does not provide any meaningful information.
Clojure code is far easier to maintain for a number of reasons. The code is declarative, so it separates what's being done from the implementation details. The first step of code maintenance is to understand the intent, and it's much easier to do that with declarative code. Immutability means that the code is largely referentially transparent, so the cognitive load of understanding a particular piece of code remains constant as the project size grows. This is not the case for imperative languages where you pass references to shared mutable state all over the place. The syntax is much smaller and more consistent, meaning that you have to learn less rules and quirks to understand the code. There are less chances of code being misinterpreted. Finally, you have the REPL, so you're able to run any code you're not clear about right from the editor in the context of your application.
My team moved from Java to Clojure about 8 years ago, and we find that it's much easier to maintain Clojure projects than it was for similar scope Java projects. We deliver faster, we have far less defects, and we're able to make changes much more reliably than we ever could with Java.
- eafkuor 8y ago> My team moved from Java to Clojure about 8 years ago, and we find that it's much easier to maintain Clojure projects than it was for similar scope Java projects Could it just be that you are all better developers than you were 8 years ago, and the language doesn't really make a difference?
- yogthos 8y agoWe're obviously better developers than we were 8 years ago since we've had a lot of practice in that time. However, my team has hired many people in that time, and we also regularly hire co-op students. We see that new employees are able to write better code in Clojure as well regardless of their experience. We've also found that it's easier to train beginners to be effective with Clojure than it was with Java. The language is smaller, more consistent, and encourages good patterns out of the box.