KJUG #37: Local Variable Type Inference: Friend or Foe

header_kjug_#37-min
Date
26.11.2020 at 19:00 CEST
Event website
Registration
Closed
Language
English

Reserve your time to meet our special guest: Simon Ritter on the next KJUG meetup!

Talk: Local Variable Type Inference: Friend or Foe.

Speaker: Simon Ritter

Abstract:

Local variable type inference was introduced as a new Java language feature in Java SE 10. Gone are the days of explicitly having to define the type of a variable; let the compiler do it for you with the magic of var!
At first sight, this looks like a small change that will eliminate unnecessary boiler-plate code and reduce how much typing (on the keyboard) is required to maintain strong typing (of the language). However, as with many features, there are some unexpected nuances as well as both good and bad use cases.
In this session, we’ll explain the fundamentals of local variable type inference. We’ll then take a series of examples of the use of var and discuss the technical merits of each case.

Bio:

Simon Ritter is the Deputy CTO of Azul Systems. Simon has been in the IT business since 1984 and holds a Bachelor of Science degree in Physics from Brunel University in the U.K. Simon joined Sun Microsystems in 1996 and started working with Java technology from JDK 1.0; he has spent time working in both Java development and consultancy. Having moved to Oracle as part of the Sun acquisition, he managed the Java Evangelism team for the core Java platform. Now at Azul, he continues to help people understand Java as well as Azul’s JVM technologies and products. Simon has twice been awarded Java Rockstar status at JavaOne and is a Java Champion. He currently represents Azul on the JCP Executive Committee and on the Java SE Expert Group.

Sponsors:

KJUG’s founding sponsor is VirtusLab

Sponsor of IDE licenses JetBrains

Books from Manning catalog

Written by

Natalia Romanowska
Natalia Romanowska Nov 17, 2020