Advantages of Functional Programming in Java 8
The article isn&#x27;t about functional programming.<p>Functional programming is programming with pure (mathematical) functions. As a consequence, functional programming is also programming with (immutable) values (i.e. persistent data-structures, etc).<p>This isn&#x27;t pedantry. The whole point of FP is being able to have your code be &quot;referentially transparent&quot;, a property that gives you &quot;equational reasoning&quot;, making your code more composable, more testable and easier to understand because you can take any function, divorce it from its surrounding context and still make some sense of it. Of course, there&#x27;s no silver bullet, yada yada, but take those traits away and the definition loses meaning and usefulness almost completely.<p>And btw I shouldn&#x27;t need to specify &quot;pure&quot; or &quot;mathematical&quot; if programming wouldn&#x27;t have overloaded the meaning of the word &quot;function&quot;. We could have stuck with &quot;procedure&quot; or &quot;routine&quot; or &quot;sub-routine&quot;. As in jumps in code that push and pop the call stack and that have side-effects. And if you want to express the act of programming using side-effectful  functions, there&#x27;s also a perfectly adequate term for it already: &quot;<i>procedural programming</i>&quot;.<p>Yes, it&#x27;s cool having closures and anonymous functions in your language. It&#x27;s sort of a prerequisite if you want your FP code to be comfortable. But that&#x27;s not FP. There&#x27;s actually nothing resembling FP about the code samples in the article.  And the implementation of AccountConverterImpl would make any programmer that likes FP to cringe.<p>On Java 8: yes, it&#x27;s becoming possible to do FP, sort of anyway. But it&#x27;s still painful as hell, with the environment actively working against you. First of all there aren&#x27;t many libraries that do FP in Java, I only know of functionaljava.org. So you&#x27;re swimming against the tide, with the standard library itself being actively hostile to FP. And you can start from the fact that Java 8 was released in 2014 and even its new Option type is breaking the Functor laws, because map(x).map(y) != map(x.andThen(y)) and lets not even mention the word monad because it scares people.<p>But I guess that if you&#x27;re forced to use Java, well, then you can find some ways to cope with it (especially if you aren&#x27;t scared of building your own stuff).