Christopher Neugebauer has been a reluctant Java developer all his life, but the trajectory of his career—first as an Android developer and then getting pulled into backend Java development projects—has led him to spending more than his fair share of time writing Java.
On the other hand, Java’s built up a huge ecosystem of libraries for everything from data processing to large application configuration. If you want to build a large business system, it’s still a great choice. Over the years, there’s been a lot of new languages targeting the JVM, but they’ve always come with a difficult learning curve, performance issues, or incomplete compatibility with existing Java code. Generally, if you want a language that plays nice with Java code, your only choice was Java.
Not anymore. Kotlin is a new language introduced by JetBrains, which aims for complete compatibility with Java features, performant built times, and improving developer productivity through improved features and type safety. Recently, Kotlin became the default language for Android development; however, not many developers know that Kotlin also targets the JVM itself, and many of the productivity benefits that Android developers get out of Kotlin are also available to developers working on the JVM.
Christopher outlines why Kotlin might be a good fit for your code base; then he walks you through a selection of features that make Kotlin exciting to use, including a more advanced type system, extension functions and methods, functional programming techniques, backward compatibility with Java code, and converting existing Java into Kotlin. You’ll walk away with an understanding of what Kotlin is and just enough knowledge to get excited about using it for your own projects.
Christopher Neugebauer is a senior software engineer at AlphaSights, where he uses Kotlin to build communications tools that put clients around the world in touch with knowledge they need; a director of the Python Software Foundation; and co-organizer of the acclaimed North Bay Python conference, a boutique one-track conference run in a live music venue in Petaluma, California. He’s an an Australian developer, speaker, and serial community conference organizer.
©2019, O'Reilly Media, Inc. • (800) 889-8969 or (707) 827-7019 • Monday-Friday 7:30am-5pm PT • All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. • firstname.lastname@example.org