DEV Community

Discussion on: Does functional programming have any advantage in real environments?

Collapse
 
ben profile image
Ben Halpern

Certain approaches to frontend development with declarative tools like React have a lot of functional programming even if it's not strict, purely functional.

I think if you're used to that kind of development, playing around with a more functional tool like Elm — to learn — will probably help give you some perspective.

Other than that, I'd say that Elixir seems like the friendliest "backend" way to get into the functional approach.

Collapse
 
codewander profile image
codewander • Edited

I agree that the majority of elixir programming involves thinking functionally, but at it's core implementation, the focus on actors reminds me of the contrast between akka and cats/zio/etc in scala. I have always considered actors to be the OO taken to it's logical conclusion, where each actor is an object that operates concurrently. In the context of scala, Akka seemed to represent the OO / java programmers coming to Scala, whereas cats and other Haskell immitations used other approaches to concurrency. (Maybe the best way to put it is the following: the local, happy path in actor processing is functional, the global and resilient path in actor systems is more imperative.)

Regardless, using elixir as a way to learn functional programming basics sounds useful, and similar to elm on frontend, phoenix provides a batteries included backend context for writing small functions and seeing them work together.