DEV Community

Discussion on: Functional Languages are Fad

 
pancy profile image
Pan Chasinga

What I think is really the first enemy of learning (anything, not just functional programming) is herd mentality. When you work at a place where the most people don't view learning new things as important, your learning muscle gets atrophied. When I got an equivalent of a scoff writing something in Ocaml, I faded away.

A specific enemy to learning a functional programming is math. The author of F# for Fun and Profit stated this very nicely, but functional languages need to ease down on math. Stop campaigning lambda calculus. It's not helping, because it attracts snobs who will keep putting functional programming on higher and higher pedestal ("Oh, really, you don't know what a monad is?") and scare away new developers.

Thread Thread
 
kspeakman profile image
Kasey Speakman • Edited

Yeah, I completely agree.

Re:math-focus. Maybe I'll change my mind one day, but this is exactly why I could not bring myself to deploy Haskell code. Even if I could be super productive with it, bringing on fresh devs seems drastically harder than something like F# because of the intertwining of category theory. I would never say this out loud, but since it is just you and me 😉, I have a theory that Haskell is more object-oriented than most OO languages. Because you kinda have to derive from the category theory objects to make canonical use of it. Whereas something like F# or OCaml or Elm, you can just pretend you are doing procedural programming + expressions + immutability + pure functions to get started and be productive. Then later notice that a lot of types use the same functions: map, bind/andThen, etc. So if you understand them once, you understand them everywhere. Then later you discover these operations are not just some dude's arbitrary contrivance, but based on provable math. mind blown. It is a great learning story IMO.