Spot on.
Where is Haskell actually used? No I meant apart from Facebook and Uber and Klarna.
> Just go and get hyped when the next minor FP feature gets integrated into your favourite language
We already have immutability in Java - why, the designers themselves made Strings immutable [1]
We said goodbye to nulls in Java [2] but in case you really don't like nulls you can also say goodbye to them by switching from Java to Kotlin, which doesn't have them [3] but also does [4].
If you want to cut down on some boilerplate (without moving to Kotlin), you can try type inference in Java [5]:
> For example, consider the following variable declaration:
Map<String, List<String>> myMap = new HashMap<String, List<String>>();
> You can substitute the parameterized type of the constructor with an empty set of type parameters (<>): Map<String, List<String>> myMap = new HashMap<>();
Go got rid of Generics which made programming so much simpler. I can't wait for its new Generics feature though.But if you really need that functional stuff - the best thing writing Java code is that it runs on the JVM, so you can code in Scala instead. And if that argument doesn't make you want to code in Java I don't know what will.
[1] https://javarevisited.blogspot.com/2010/10/why-string-is-imm...
[2] https://programmer.help/blogs/finally-i-m-happy-to-say-goodb...
[3] https://medium.com/kayvan-kaseb/say-bye-to-nullpointerexcept...
[4] https://stackoverflow.com/questions/50427490/nullable-type-s...
[5] https://docs.oracle.com/javase/tutorial/java/generics/genTyp...