DEV Community

Discussion on: Why use functional style in Java?

Collapse
 
eljayadobe profile image
Eljay-Adobe

For JVM, it will probably be even more beneficial to use Scala (object-oriented programming w/functional-programming support) or Clojure (programmer's programming language w/functional-programming support) to do functional programming.

Because using Java in a functional style isn't the same as using a programming language that has functional-programming support.

Are there any functional-first programming languages for JVM? Something along the lines of Haskell (FP pure), OCaml, or F# (FP impure -aka- FP practical).

Collapse
 
siy profile image
Sergiy Yevtushenko

Of course, there are other languages which might be a better fit for functional programming. In my posts I'm not trying to convince anyone that FP is good, there are many other people who already doing that. Instead I'm trying to show that Java is suitable for FP and use of FP in Java provides a lot of benefits.