v0.5.0
π Milestone 5 Release: Ballerina Native Interpreter
We're excited to announce Milestone 5 β introducing ballerina/http client capabilities and subset 8 language features!
What's included
π HTTP Client Support
Outbound HTTP/HTTPS communication via ballerina/http is now supported:
- Configuration of
http:Clientwith timeouts, redirects, HTTP versions, and security settings - Support for standard methods:
get,post,put,patch,delete,head, andexecute - Response processing via
http:Response(headers and JSON, text, or binary payloads) - Utility for parsing HTTP headers with
http:parseHeader
Example:
import ballerina/http;
import ballerina/io;
final http:Client apiClient = check new ("https://httpbin.org/", {
timeout: 10
});
public function main() returns error? {
http:Response res = check apiClient->get("/get?text=Hello%20Ballerina");
io:println("GET Response Status: ", res.statusCode);
io:println("GET Response Payload: ", check res.getTextPayload());
json data = {"message": "HTTP client support is now live!"};
res = check apiClient->post("/post", data);
io:println("POST Response JSON Payload: ", check res.getJsonPayload());
io:println("Post Response Content-Type Header: ", check res.getHeader("Content-Type"));
}π Language Features
Types & Type System
- Add support for module type definitions and enums
- Add support for optional record fields and access
- Add support for mapping constructors
- Add support for member access expressions
- Extend support for type casting
- Support dependently-typed functions with inferred defaults
Functions
- Add support for included record parameters
- Add support for rest parameters in methods
- Add support for isolated functions
Object-Oriented Features
- Support
clientandisolatedclass qualifiers - Add support for remote methods and call actions
Control Flow
- Improve analysis in conditional branches
- Add support for
foreachover iterable objects - Extend query expressions with
join,order by, andon conflict
Expressions & Operators
- Add support for XML template namespaces and attributes
- Add support for bitwise complement and nil lifting
βοΈ Runtime
- Detect inherent type violations during mutations
- Enforce read-only propagation for collections
- Fix float semantics and NaN handling
π¦ Projects & Packages
- Support resolving external packages and repository implementation
π Standard Library
- Expand lang lib support (
error,value,string,xml,int)
π οΈ Diagnostics & Quality
- Improve error reporting and migrate conformance tests
π Documentation
- Document subset 8 language features
π Download or try it directly in the browser!
π Resources
- Release: v0.5.0
- Supported features:
- Language: subset8.md
- Standard Library: subset1.md
- Examples for subset 8: corpus/bal/subset8
- Full Changelog: v0.4.0...v0.5.0