Part 3. Non-Java languages on the JVM

This part of the book is all about exploring new language paradigms on the JVM. The JVM is an amazing runtime environment: it provides not only performance and power but also a surprising amount of flexibility to the programmer. In fact, the JVM is the gateway to exploring other languages beyond Java, and it allows you to try out different approaches to programming.

If you’ve programmed only in Java, you may be wondering what you’ll gain from learning different languages. As we said in chapter 1, the essence of being a well-grounded Java developer is to have a growing mastery of all aspects of the Java language, platform, and ecosystem. That includes an appreciation of topics that are on the horizon now but that will be an integral part of the landscape in the near future.

The future is already here—it’s just not evenly distributed.

—William Gibson

It turns out that many of the new ideas that will be needed in the future are present in other JVM languages today, such as functional programming. By learning a new JVM language, you can steal a glimpse into another world—one that may resemble some of your future projects. Exploring an unfamiliar point of view can also help you put your existing knowledge into a fresh light. This opens the possibility that by learning a new language you’ll discover new talents you didn’t know you had and add new skills that will prove useful going forward.

In chapter 9, we’ll look at Kotlin, a relatively young language that addresses many of the criticisms of Java without radically altering the fundamentals. It aims for conciseness and safety, while also unlocking use cases that in the past leaned more toward dynamic scripting languages.

Functional programming has continued in recent years to draw attention as an alternative to the typical object-oriented viewpoint expressed by Java. To get a taste for this different world, you’ll see Clojure, one of the functional languages on the JVM that departs the furthest from the Java mindset.

Parts 4 and 5 will frequently circle back to these languages, showing how they apply throughout your projects—from building and testing, through to deeper issues of concurrency and program structure. So let’s step away from the comforts of Java for a bit to see the alternatives available to use.

  

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.114.245