Venkat Subramaniam: Kotlin And Python Are Fun, But Java Developers Are Semantically Aligned With The Future

Venkat Subramaniam: Kotlin And Python Are Fun, But Java Developers Are Semantically Aligned With The Future

Whether he’s pacing the keynote stage in stocking feet, or taking you through “A Dozen Cool Things in JVM Languages,”Venkat Subramaniam leaves you with a sense of exhilaration about computer programming.

His gift for inspirational analogy is rare, and even more so because it’s about software development.

“Do you work for the compiler or does the compiler work for you?” he asks the audience at Oracle Code New York, pointing out a common struggle in object-oriented programming, of having to repeatedly define, or cast, an object type so that it can do related work.

“You call it casting, I call it punishment,” he says. The Colorado-based professor of computer science at the University of Houston points out that a new Java Virtual Machine-based language called Kotlin uses “smart casting,” and that Java will eventually have this feature as well.

Subramaniam is a sought-after keynote speaker and a successful author not only for his language flair but also because of his reasoned perspective on fast-changing programming trends. Discussing Kotlin, he notes it’s attractive because it dispenses with punctuation—semicolons, parentheses—and makes it easier to do compile-time metaprogramming. “The language permits you to remove the ceremonies and make the syntax more natural, like human language. That helps to create DSLs—domain specific languages—which require that kind of fluency,” he says in an interview after his keynote.

The growing popularity of languages like Kotlin and Python, Subramaniam observes, shows that the next generation of software developers “like less ceremony.” But that doesn’t worry this polyglot programmer, who has written books on Java, .NET, Scala, Groovy, JavaScript, and now Kotlin: “Java is steadily moving in the direction of low ceremony and improved efficiency.”

When an exciting new language pops up, it’s much like a toddler who will have to grow up, he explains: “Cuteness is not sustainable—we still want performance. This is one of the reasons why, when designing languages, you can’t focus on details of expressiveness alone.” With each release, Java is becoming more expressive while continuing to offer that performance, he says, and is evolving quickly to meet the needs of cloud native developers.

One example is in concurrency, a form of computational multitasking that has been possible in Java since its inception thanks to the concept of threads. Subramaniam points to Project Loom, which will introduce fibers—small-footprint threads that “are truly nonblocking,” he says. “I’m betting on Java being the one of the most vibrant languages for asynchronous programming. Nonblocking is more important than parallelism in my opinion,” he says, adding, “I’m absolutely thrilled with the direction Java is going.”

How Has Java Lasted 24 Years?

Part of what amazes Subramaniam is how old Java is. Why has it lasted?

Calling Java “a perfect storm,” Subramaniam lists the reasons for its continued growth. First, it’s the language with the most developers in the world. Second, it’s built on the strong platform of the JVM. And third, the language started evolving in new ways about six years ago, and the pace has accelerated. “If Java had not evolved at the pace at which it started evolving, we wouldn’t be talking about it today,” he says.

That’s because key developers behind the language understand that a language must evolve or die. “But at the same time, they’re not evolving in a way that is unhealthy. They are being very pragmatic,” he says. As a result, the evolution continues to bless Java developers with features that increase productivity.

One small example: The Switch expression, which is changing from being an imperative control flow—if this, do that—to becoming a complex and elegant pattern-matching syntax. While the change is not yet complete, Subramaniam explains that the current interim stage paves the way for a transformation of Switch in Java 13 and 14. Subramaniam supports that kind of pragmatic, incremental approach, which is happening across the board. Making a dramatic change risks breaking things, but he believes there’s a even bigger risk: not allowing feedback and experimentation.

“If you really think about it, this is what true agile development is: feedback-driven. You are doing something and seeing if it makes sense by getting an active community to give you feedback on it,” Subramaniam says.

GraalVM Will Change Java

Java is also evolving on the platform side, in the form of the GraalVM polyglot virtual machine, which improves performance for many JVM-based languages and offers native compilation. “GraalVM is a game-changer. It’s a truly polyglot environment,” Subramaniam says. “You’re able to write code in different languages, and benefit from capabilities of different languages. And you can compile down to different native binaries.”

Subramaniam understands why it took the Oracle Labs teamseven years to develop GraalVM. “There are a huge number of unknowns and risk involved when you take on something of that magnitude,” he says. “It’s not feasible to develop something like that, in the initial stage, incrementally. At the same time, they didn’t bake the whole thing and release it. We have had versions of it along the way for developers and organizations to try it and provide feedback.”

A Passport to the World

Subramaniam’s visit to New York was not only the beginning of a speaking jaunt that would take him to Europe next, it was also punctuated by a community-voted honor: a Groundbreaker Award presented by Oracle. As he and the other Groundbreaker winners demonstrate, being a software developer—especially a Java developer—can provide a passport to the world.

Asked about that, Subramaniam clarifies with a more universal truth. “Knowledge is the passport to the world,” he says. “When you are knowledgeable and you are in demand, it’s a win-win: you can benefit and contribute to the community at the same time.”

But he is also extremely bullish on Java developers’ prospects. “Don’t wait for the future, it is already here,” he said in his Oracle Code keynote. Thanks to the diversity of languages running on the JVM, Subramaniam told Java programmers they are well-positioned for the future: “Semantically, you are already aligned with it.”

Source: forbes