Ballerina
bal --version A Ballerina program is organized into modules (like packages). Each .bal file contains imports, functions, services, and listeners. Hello World import ballerina/io; public function main() io:println("Hello, World!");
Run tests:
type Employee record string name; int salary; ; Employee[] employees = [ name: "Alice", salary: 5000 , name: "Bob", salary: 6000 ]; ballerina
public function main() future<int> f1 = start task1(); future<string> f2 = start task2();
curl http://localhost:9090/api/greeting/John Call external services using built-in clients. bal --version A Ballerina program is organized into
function task2() returns string return "done";
Run:
Ballerina uses strands – lightweight threads managed by the runtime. Use start , wait , and isolated functions.