←back to thread

Type checking is a symptom, not a solution

(programmingsimplicity.substack.com)
67 points mpweiher | 1 comments | | HN request time: 0.339s | source
Show context
toolslive ◴[] No.45142651[source]
>functional programming languages ... break down when you try to coordinate between components, especially when those components are distributed ...

I think the exact opposite. Having spent more than a decade in distributed systems, I became convinced functional programming (and pure functions) are essential for survival in distributed systems.

Back then I wrote down my insights here (amazed that the site still exists)

https://incubaid.wordpress.com/2012/03/28/the-game-of-distri...

replies(3): >>45142659 #>>45142848 #>>45142939 #
zamalek ◴[] No.45142848[source]
Even with my limited knowledge about FP I am pretty sure I would only grow more in agreement as I learn more. My only exposure to functional is via Nix and Rust (I promise I'll learn OCaml soon). One thing that I've really come to appreciate is the concept of "making invalid states unrepresentable," a trick that is harder than it should be (though not impossible) in "less functional" languages. Coming back to distributed systems, I have wondered what a functional database would look like. Mutations as pure functions, DUs in tuples, could we store a function, etc.
replies(2): >>45142971 #>>45143405 #
1. toolslive ◴[] No.45142971[source]
regarding databases, you get quite far using purely functional data structures and zippers.

- https://www.cs.cmu.edu/~rwh/students/okasaki.pdf

- https://en.wikibooks.org/wiki/Haskell/Zippers