Spare keystrokes with the record keyword | Modern Java | JDK 16 | Head Crashing Informatics 26

preview_player
Показать описание
#Java's record keyword is ready for production use in #JDK16, which officially will be here mid March. Spare lots of keystrokes and get rid of code generators and IDE magic with this new keyword!

In addition to spare typing, your Java source code also is getting much easier to maintain and to understand, as it is so concise and fully integrated into the compiler and the runtime. While, besides of shorter source code, there is no measurable speed gain or reduced binary footprint currently, I could imagine that in future the runtime could further optimize records, as it knows that records are definitively immutable and non-extensible.

Maybe project Valhalla will then treat them as primary data types, as they already are best suited for passing around pure values -- so your code would run in double speed consuming half the memory?

Secure a headstart: Use #Java16 NOW!

Рекомендации по теме
Комментарии
Автор

Subscribe to my channel so you don't miss my new videos!

headcrashing