Comment by Reefersleep

1 month ago

As I gained more experience writing Clojure, I went in the other direction; familiarity with the standard library means that any composition of those functions and data structures is easily grokked. People's strained attempt to name every little line of code? Not so much. You end up jumping around the code a lot and, in my case, suffer the "portal effect" where you forget the context of what you were trying to understand. Also, namespaces become polluted with functions that only serve as assistants to your main function. This is a lesser concern, but still, it dilutes the focus of the namespace.

A nice middle way is using let bindings for whatever you want to give clearer names. You get the name you want while reducing the reader's scope to the literal let binding.

I do agree that big functions can be unwieldy, but I think that if it's mostly core clojure fns, and you're experienced, much bigger sized fns are acceptable than name-everything advocates generally prefer.

But it's individual and an artful balance even if the only reader is yourself. There's no silver bullet.