Java Data Containers

preview_player
Показать описание
Let's go over data containers in Java 15. There's many possibilities to store data; not all of them are perfect. Maps are awesome in languages like JavaScript and Python, but super difficult to just initialize in Java. Tuples are also easy in JavaScript and Python, but not possible out-of-the-box with Java; even with Java 15, external libraries must be used to get tuples to work. Java classes may seem like the only hope, but using annotations with Lombok will ease the pain; still, does annotation really help or hurt with annotation pollution. The secret is with Java Records, a new type of data container in Java. It's analogous to Python's data classes. All the problems we see with Maps, Tuples, Classes and Annotations go away with Records. Start using Records today.
Рекомендации по теме