JAXenter: What do you think is the most important new feature in Java 14?
Oliver B. Fischer: The probably best known feature, text blocks, is of course obvious, because it will significantly contribute to a positive developer experience. Personally, I find the introduction to pattern matching with “JEP 303: Pattern Matching for instanceof” interesting, as well as “JEP 361: Switch Expressions.”
SEE ALSO: Java – the fourteenth
JAXenter: What feature do you think is missing in Java 14?
Oliver B. Fischer: This is an easy choice: string interpolation for strings and text blocks.
JAXenter: Will you or your customers update right away or is that not worth it?
Oliver B. Fischer: Java 14 is not an LTS version, which is understandably an important aspect for many customers when it comes to using it in production. On the other hand, the ability to quickly upgrade to a higher JDK version is also a quality indicator for software development in an organization. General statements are not possible, only recommendations. Whenever possible, I would always switch to the next JDK version rather soon.
JAXenter: What difficulties could it pose to immediately use the new Java version in production?
Whenever possible, I would always switch to the next JDK version rather soon.
Oliver B. Fischer: We have to distinguish between new language features and new JDK versions. Especially the update of JDK versions can lead to surprises, for example when there are large version jumps and security changes since the previous update. In general, every software should be tested with the next higher JDK version in the CI pipeline or in test environments.
New language features should only go into production when they are final. Using new language features in tests first is a good way of gathering first experiences with them.
JAXenter: With features like “JEP 358: Helpful NullPointerExceptions“, is Java approaching “modern” languages like Kotlin?
Oliver B. Fischer: I would say it was about time. This is a good example because it shows that even small changes can significantly improve the developer experience.
SEE ALSO: Java 14 – “It feels like the early days of Java.”
JAXenter: In general, what do you think about the acceleration of Java with the six month release cycle?
Slow and steady wins the race.
Oliver B. Fischer: To be honest, I have mixed feelings about it. On the one hand, I see it rather positively when I think about how long it used to take before new language features were introduced.
On the other hand, the history of JEP 355 for text blocks, starting with the then withdrawn JEP 326 for raw string literals, shows that not everything can be pressed into six-month blocks. For me, text blocks would be complete only with string interpolation. And also, the new switch expressions are not perfect from my point of view, because they differ from switch statements, which exist in parallel, regarding their fall through behavior. This will cause many programming errors. I would say: Slow and steady wins the race.
The post Java 14 – “Small changes can significantly improve the developer experience” appeared first on JAXenter.
Source : JAXenter