Ballerina version 1.0 adds Java interoperability and targets the JVM
Ballerina 1.0 has officially hit the stage! This open source programming language focuses on cloud-era applications, is cloud-native, and can simplify microservices development. Let’s recap some of the language’s features and what it sets it apart from the pack. Then we will dive into the release notes and check out what this latest release includes.
Start practicing your grand jeté en tournant, because Ballerina 1.0 hits the stage. Version 1.0 arrived on September 9, 2019, after 3 years of work.
Ballerina is an open source programming language and platform that focuses on cloud-era applications. Before we run through the new additions, let’s have a recap about this “developer first” language. What sets Ballerina apart?
In 2018, we talked with WSO2 co-founder and CTO Paul Fremantle about Ballerina’s features, its serverless advantages, why it’s cloud-native, and how it can simplify microservices development.
Here’s what he had to say about the programming language’s core features:
Services, network endpoints and connectors to remote systems are all first class concepts in the language.
When you call network services, often the messages don’t fit neatly into a single type. For example, a message may be JSON when it’s successful, but some transparent proxy or gateway may return a different type of error, or the network stack can respond with local errors too. In the language, the union type system represents these options very naturally without requiring the developer to create complex objects just to represent that.
A worker concurrency model designed around sequence diagrams, with tools to draw the sequence diagrams directly from the code.
Streams are part of the core language with an integrated query model that allows patterns in streams over time to be captured without complicated code. Direct support for asynchrony and event-based models including WebSub.
Every HTTP service automatically maps to OpenAPI.
Ballerina also has a package management and versioning model built in.
Some other important notes about the language:
- Extensible metadata: For easy use with cloud platforms
- Structural, open typing
- Sequence diagrams for programming
- View the standard library
Version 1.0.0 changes
1.0.0 improves upon the language, making some syntax and semantics changes. It adds some new features, enhances some standard library modules, redesigns developer tools, and more. Let’s break it down.
- Java interoperability: Call Java code from Ballerina
- New compiler back-end: jBallerina targets the JVM and produces an executable JAR file. (This deprecates the previous runtime implementation – BVM, and improves upon its features).
- Introduces new modules/lang library
- Expressions now allowed as default values for function parameters
- Standard library changes and improvements
- New tooling: Including a Debug Adapter Protocol implementation, OpenAPI validator compiler plugin, source formatting CLI tool, OpenAPI to Ballerina generator CLI tool, and Ballerina to OpenAPI generator CLI tool.
- Lax typing
Join the movement
Before you lace up your slippers, see the language overview and study up on the language concepts, how to work over the network, and see what experimental features it contains. Ballerina offers a variety of language examples that can get you started.
Once you’re ready, the quick tour will get you started.