Stanislav Gobunov

Programmer and DevOps Engineer

Where are we headed in 2020?

Posted at — Jan 19, 2020

As we enter a new decade, we asked programming experts, including several of our own O’Reilly authors and instructors, for their thoughts on what’s in store for some established players and fast-growing languages.

Python

The biggest news this year in Python is that creator and “benevolent dictator for life” Guido van Rossum retired, leaving Python in the hands of the Python Steering Council. So far, it’s been a painless shift in power, which as Eric Matthes, author of Python Crash Course, argues, should come as no surprise, since “Guido has carried himself, and his role in the community, with such poise for so long.” 2020 will also see the end of support for Python 2.7, which will likely cause its share of headaches among holdouts. Meanwhile, Python continues to be the language of choice for data science.

For Matthes, one exciting aspect of Python has been “the variety of interesting and critical projects that [have] come out of a community where diversity has so intentionally been built for so long.” Carol Willing, a member of the Python Steering Council and a core developer of CPython, also celebrates these projects—like the Binder service, which promotes reproducible research by creating an executable environment from your Jupyter notebooks—particularly as they expand beyond their initial aims. Binder, she notes, “was widely used [last] year for teaching workshops and tutorials at many Python conferences.” Willing also offered a shout-out to the CircuitPython and Mu projects, asking, “Who doesn’t love hardware, blinking LEDs, and sensors and using Mu, a user-friendly editor that is fantastic for adults and kids?”

Java

It’s mostly good news on the Java front. Java Champion Ben Evans explains, “Once again, rumours of Java’s demise have proved to be little more than wishful thinking on the part of the platform’s detractors.” But it hasn’t all been smooth sailing. As we noted last year, the release of Java 11 in September 2018 brought a raft of new features, including many that give the release a significant, clear advantage for using containers. However, wide adoption of this latest release hasn’t followed suit, with more than 80% of developers still on Java 8, according to this JetBrains survey. Evans wonders, “Does this mean that people aren’t running Java in containers as much as we’re told they are? Or do people just not know about the benefits of 11 in containers?”

Despite the slow rate of adoption, Java’s six-month release cadence has been trucking along—Java 12 dropped in March 2019, with Java 13 following in September. And according to Java Champion Trisha Gee, it’s really starting to show its value.

Each release is quite small but predictable. And although they don’t all have exciting new language changes, you can see the language moving forward steadily. In addition, it enables this idea of preview features, which I think we saw working really well for switch expressions—developers got to try out the feature and give real feedback based on how it feels to work with, instead of feedback on abstract, conceptual ideas. In response, there was a small change to the syntax of switch expressions, which was possible due to it being a preview feature and not set in stone, in Java 13. Now this updated syntax is scheduled to be part of JDK 14 as a production-ready feature.

And 2019 brought another surprise when Oracle moved Java SE to a subscription-based model. But as Marc Loy, coauthor of Learning Java, fifth edition (now in early release), points out, “The Java community at large [has approached] this unfortunate change with increased enthusiasm for the OpenJDK.”

As for the coming year, Evans suggests that 2020 will be about watching the trends that started in 2019 play out.

How close to a production version of Project Valhalla will we be? Will the incremental strategy of delivering pattern matching and algebraic data types (Project Amber) pay off? Will Quarkus bear out its promise and the faith of its early fans? Will 2020 be the year that Kotlin makes a significant beachhead beyond Android? These are exciting times—we’re in transition towards something new and there’s a lot going on.

Kotlin

Google announced in May 2019 that Kotlin is now its preferred language for Android app developers, boosting the language’s already strong adoption. Although many Android developers are still in the process of making the move to Kotlin, those who have already transitioned know the benefits it offers. Dawn and David Griffiths, authors of Head First Kotlin, share a few reasons behind Kotlin’s ascendance.

For a language created by an IDE company, it’s no surprise that Kotlin has a healthy level of tooling support. The experimental DSL for code contracts gives developers the ability to provide guarantees about the ways that code behaves. Does your function have side effects? Is it guaranteed to return a non-null value? Code contracts allow you to make these promises, and the compiler can use them to loosen compile-time checks. The barriers between different Kotlin platforms are now also breaking down. The “expect”/“actual” qualifiers allow developers to more easily write code that is compatible across Java/Native/JS environments. And serialization support now means that it’s even easier to convert JSON data into Kotlin objects, and vice versa.

Expect to see Kotlin continue its impressive growth and not just in Android. Hadi Hariri, leader of the developer advocacy team at JetBrains, points to the success of Kotlin/Everywhere a series of community-led events where you can learn the essentials and best practices of Kotlin in Android, Google Cloud Platform, and multiplatform development as proof: “From May to November we’ve managed to reach close to 30,000 people in 86 countries. KotlinConf sold out three years in a row with over 1,700 attendees in 2019. This really shows amongst other things, that interest and adoption of the language is growing.”

Go

When Gophers think back on 2019, they’ll likely remember the saga of the try proposal. Go developer and writer Jon Bodner explains.

One of the most common complaints about Go is that error handling is too verbose. So in early June, the Go core developers proposed adding a new built-in function called try. A GitHub issue was opened to discuss this new feature. Within a month, there were nearly 800 comments, most of them negative. The people who were against the new feature felt that this change made code too “magical” and obscured the logic flow. After reviewing the feedback, the Go team marked the proposal as closed and rejected on July 16.

What’s notable about this process wasn’t the failure of the feature but rather, as Bodner describes it, “the way the process happened: A feature was proposed, the discussion was respectful, but many felt that the change was inconsistent with Go’s style. In the end, the people who steward the language decided to respect the majority opinion. That’s what developers mean when they talk about community.”

2020 should bring more clarity to Go’s Contracts specification, better known as the Generics proposal. According to Bodner, “It looks like Go is going to implement generics using an approach that is a bit different from other languages, but which fits nicely into the idioms of Go.” It will hopefully allow Go to keep its idiomatic style while adding a feature that developers have found useful in other languages.

Rust

We checked in with Jim Blandy, coauthor of Programming Rust, to see how his vision of Rust’s progress changed over the course of 2019. Last year, he noted that “Rust has supported asynchronous programming in one form or another for a long time, but async functions provide a syntax for this sort of code that is a major improvement over what Rust has had before.” Did his hope for improvements to the Rust syntax come to fruition? Yes, eventually: Blandy explained that async/await syntax didn’t become stable until version 1.39, which was released November 7, 2019. “Originally, we were hoping async/await syntax could be part of the 2018 edition of Rust, but it took longer to get things right.” Still, he has high hopes for what async will mean for Rust in 2020: “Integrating async into the language lets the borrow checker understand what you’re doing, so asynchronous code can look like idiomatic Rust.” And as Blandy points out, the Rust ecosystem is acting quickly to take advantage of the language’s new expressiveness.

The Rust community is also excited about WebAssembly, which this year became a theoretical replacement to C/FFI for ecosystems that need portable, high-performance modules. And as Rust expert Nathan Stocks notes, “You get light sandboxing as well!” What impressed Stocks most was “how much of the theory had been prototyped and demonstrated successfully.”

I had previously thought of WebAssembly purely as a compilation target to run code from non-JS languages in the browser. The addition of the ability to consume web assembly from any language outside the browser was mind-bending.

Swift

The biggest stories in Swift last year were the releases of SwiftUI, Apple’s newest framework for designing user interfaces across all Apple devices, and Swift for TensorFlow, a platform for deep learning and differentiable programming integrating Google’s TensorFlow framework with Swift. SwiftUI, as Timirah James explains, “has already gained so much traction amongst developers (rightfully so) with its declarative nature and is already being seen as a possible future successor to UIKit.” As for Swift for TensorFlow, Paris Buttfield-Addison calls it “a radical new use for Swift.” He explains, “Swift has always been a great app development and systems programming language, and is a great up-and-coming web and backend development language, but now, with Swift for TensorFlow, it’s a powerful ML framework too.” Here’s why:

Swift for TensorFlow is developed by a team that includes the original creator of Swift, Chris Lattner, and provides (or will, when it’s done) everything you need for machine learning and numerical computing. Most surprisingly is the full first-class support for differentiable programming with automatic differentiation, which is made possible by Swift’s underlying compiler framework and design.

Full in-language differentiable programming will make a whole collection of previously impossible things possible: the best example is being able to use a standard programming debugger to step through backpropagation and debug derivatives when you’re building a neural network.

Swift for TensorFlow also brings full Python support to Swift, allowing data scientists to mix and match the useful and familiar Python frameworks they need, with clean expressive Swift code.

Looking ahead, both James and Buttfield-Addison are excited to see the new directions Swift takes, with James pointing to “Swift adoption across different communities and stacks beyond mobile, especially in the serverless realm” and Buttfield-Addison calling out “amazing web development frameworks, like Kitura, and all sorts of amazing frameworks for niche areas…, such as SwiftPlot, which is a Swift native version of the ubiquitous Matplotlib from Python.”  

What lies ahead?

Change is inevitable, and as programming languages continue to lean in to optimization for new trends in the cloud, microservices, big data, and machine learning, each language and its ecosystem will continue to adapt in its own unique way. Big releases may be on the horizon in 2020 for certain languages, C++20 will be released this summer and Scala 3.0 is expected in late 2020, but what’s clear is even the smallest changes can cause huge waves in the daily lives of programmers.