3 ms·
IMO there are two different types or schools of functional programming. There is the Lisp/dynamic typing (Scheme, Clojure, Erlang, Elixir, Julia...) style: Av
by dgb23 6y ago
IMO there are two different types or schools of functional programming.
There is the Lisp/dynamic typing (Scheme, Clojure, Erlang, Elixir, Julia...) style:
Avoiding state from a correctness perspective is a basis but not necessarily the end-goal here.
The primary goals are to decrease complexity and coupling and increasing malleability, composability and empowering through interactive development (REPL).
And the statically typed (Haskell, OCaml, Scala, F#...) one:
Here there is a much stronger focus on internal consistency of programs, which enables stronger mathematical soundness and reasoning.
Note that this distinction is only in part equal to the general dynamic vs static one. Typing discipline is not completely orthogonal to the paradigm (for example imperative vs functional).
I personally am very much in the camp of the former and only have superficial understanding of the latter.
I always recommend SICP because it was the book that helped me 'get it'. But there might be more modern alternatives.
A question you can ask yourself: How do you approach programming?
- Your program design is usually very high level. A graph of ideas. Then you want to interactively and iteratively discover requirements and check assumptions. You strive for simplicity and want to gradually achieve robustness, only where needed.
- You think in terms of laying out rules and form. You want to infer the connections and implementations given those rules. You gain satisfaction from solving puzzles upfront to enable strong run-time guarantees and sound abstractions.
If you lean stronger towards one of these thinking models then you might consider diving deeper into its respective typing discipline.