Write better functional Java Code - Brian Vermeer

preview_player
Показать описание
Video from Devoxx Poland 2019.

In Java 8 functional style programming was introduced in Java. Although many are still working Java 8, new releases 9,10 and 11 extended this with some nice new features. For many people, it is hard to grasp the idea of functional style programming after so many years of purely working in the imperative OOP style. The opportunities Java gives us out of the box are massive, but with great power comes great responsibility.
Рекомендации по теме
Комментарии
Автор

At 7:49, the "if" and "else" blocks duplicate the same thing, and the "contains" check is kinda redundant. So you could have written a 1-liner:

String name = beer.getName().replace(" ", "");

SirWolf
Автор

I don't know why people start advocating for immutability over mutability. All these speakers should educate the people about the concepts of mutability & immutability rather suggesting immutability over mutability. Do these people themselves understand that good coding is not possible by neglecting the other, so all the coders must understand the balanced usage of these two important concepts. And rather suggesting the coders about what they should do or shouldn't, these people educate about the strengths of both the sides & then let the coders decide which fits well in what situation. Who can do the sensible coding using either pure immutability or pure mutability?

nitinagrawal
Автор

Sorry but this mutator is not implemented correctly. Good idea bad implementation.

dawidszyszko
visit shbcf.ru