DEV Community

loading...

Discussion on: Why I don't believe in pure functional programming anymore

Collapse
eljayadobe profile image
Eljay-Adobe

I've come to FP through F#. F# is an "impure" FP language, but I think it'd fall more under the pure umbrella than outside of it, regarding the points in your post.

I describe F# as "OCaml for .NET".

In my assessment (which echos Bryan Hunter of Firefly Logic), the "big wins" for FP are:

  • succinctness and expressivity
  • immutability
  • recursion
  • pattern matching
  • higher-order functions
  • code as data
  • separation of behavior from data
  • referential transparency

In the meantime, I'll use C++. Because I can get a job using C++.

The thing I'm impressed with Rust is its amazing strong ownership model, and how it uses its novel compile time type state to make that happen. It is poised to eat C++'s lunch.