Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We're switching to Clojure specifically because of maintainability. In Clojure your functions tend to be concise, operate on immutable data structures (no side effects) and can be tested/mocked easily. The lack of boilerplate alone makes for a much better signal-to-noise ratio during review or refactoring.

I've been a Perl hacker for 15+ years and still spend too much time reviewing code from CPAN to understand what's going on. I've been using Clojure for about 6 months and find that I can read and understand many of the major Clojure projects on GitHub quickly. Some may claim that says more about Perl than Clojure, but I'm chalking it up to Clojure :)



I'd be very much interested to know more about your experience and insights comparing Perl and Clojure. Would you mind writing them up?


I'd love to do a detailed blog post on it, but unfortunately I'm too swamped right now.

The summary:

- Any serious codebase is going to exceed the complexity you can hold in your mind at one time

- Once that happens, it's crucial that you can reason about the part you are focusing on

- Interactions between components are MUCH harder to reason about if they share mutable data

- It's possible to design cleanly isolated components in any language

- But we found that Clojure makes it natural to write concise, testable and isolated code

- So much so that writing sloppy/badly designed systems _feels awkward_ in Clojure

- For us, that was more beneficial than a book full of patterns or best practices

- YMMV, but I'd try it out and be sure to get over any aversion to Lisp before passing judgement

edited for formatting




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: