2 ms·
I wanted to use Clojure for a long time, and finally I found a project that was "simple" enough to use it on (but which exercised some of the benefits of functi
by blunte 10y ago
I wanted to use Clojure for a long time, and finally I found a project that was "simple" enough to use it on (but which exercised some of the benefits of functional programming.
Mine was a backup purge scheduling tool that read a user's (admin user) CSV file for dictating backup retention rules and then did analysis on the Bacula system, ultimately generating a shell script that would delete the appropriate backups.
In some worlds that would be considered insignificant, but it was a real world problem with great risks (deleting the wrong backups can be really bad).
When it was done, I did a code review with different Ruby and Python colleagues. That's where the benefits really began to show - I could illustrate the simple rules, the facts and behaviors, and we were able to build upon those solid rules. People who didn't know Clojure and who had no exposure to Lisp could confidently agree that the behavior of the program was to spec.
That, for me, is the beauty of Clojure (or perhaps Lisp).