Hacker News new | past | comments | ask | show | jobs | submit login

i'ved only dabbled in clojure/lisp, but i've heard many lisp programmers talk about "thinking in lisp". can you share some of the particulars of what that means and why thinking in lisp/clojure is beneficial?



From my experience with Clojure, and how it changed my thinking:

1. I stopped thinking about OOP, classes, “patterns”, frameworks, and mostly think about what data flows through the program, how it’s (they’re?) transformed and stored. It’s a much clearer view of a system, I think.

2. I started being very conservative about mutable state. I keep mutable parts few and mostly on the top level, and compose program logic from practically pure functions. It helps with debugging issues immensely, and fewer issues arise because pieces can’t interact unpredictably.

3. I stopped caring about types/shape of data inside modules, and spec the hell out of it on module boundaries. IMO static typing is too strict for the former use case, and too loose for the latter. It allows more flexibility in implementation without actual breaking changes.

4. I now enjoy developing in REPL, updating a running program, adding features in real time. It feels so natural.




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

Search: