Hacker News new | ask | show | jobs
by jugjug 902 days ago
Lately, I have been struck by pragmatism of approaches discussed in https://clojuredesign.club/

For example, one can start separating pure functions from side-effects, aiming for aggressively minimal side-effecting functions. Applying this approach to calling REST APIs, one would first create a full request (including the http method, body, headers, etc) in a pure function, and only then send that request to the wire. With such a split, one can easily unit-test the request construction (it's a pure fn), and also explore the request.

It was mind-bending to me when I first heard it. The podcast is full of such approaches and it seems that Chris and Nate, the hosts, have quite some battle scars to source from.

1 comments

I'm intrigued. Could you provide some pointers on where to start at https://clojuredesign.club?
I've been thinking about this, but I don't really know. The podcast is a lot of Clojure, which by itself might be an interesting language to learn. Some people report that learning Clojure was different than other languages, eg Uncle Bob, Gene Kim (see "Love Letter to Clojure") or I think even Paul Graham.

Maybe the Effectively Isolated Serie might be interesting (ep 021-027). Oh, and Cooking Up Composition, about composing functions (ep 093-098).