LAML combines the simplicity of Python with the performance of Go, offering a rich set of features for every development need.
// Fibonacci benchmark
function fib(n) {
if (n <= 1) return n
return fib(n - 1) + fib(n - 2)
}
let start = time.now()
let result = fib(35)
let duration = time.now() - start
print("Result: " + result)
print("Time: " + duration + "ms")
// Modern LAML v3.3.0 syntax
bring xcs.class34;
func main() {
let numbers: array = [1, 2, 3, 4, 5];
let doubled: array = [];
loop i in numbers {
doubled.push(i * 2);
}
say "Original: " + numbers;
say "Doubled: " + doubled;
}
// LAML v3.3.0 features showcase
bring xcs.class34;
func main() {
// Enhanced data types
let age: int = 25;
let height: float = 5.9;
let name: string = "Alice";
let isActive: bool = true;
let scores: array = [95, 87, 92];
// Conditional logic
if age >= 18 {
say name + " is an adult";
}
// Array operations
say "Scores: " + scores;
}
LAML compiles to optimized bytecode for efficient execution, with colored compiler output and enhanced error reporting.
// LAML v3.3.0 syntax
bring xcs.class34;
func calculate() {
let numbers: array = [1, 2, 3, 4, 5];
let sum: int = 0;
loop num in numbers {
if num > 0 {
sum = sum + num;
}
}
say "Sum: " + sum;
}
LAML v3.3.0 introduces comprehensive data types with type inference and enhanced array support for safer, more expressive code.
// Type-aware programming
func processData(items: array) {
let result: array = [];
let count: int = 0;
loop item in items {
if item > 10 {
result.push(item);
count = count + 1;
}
}
return result;
}
Write once, run everywhere. LAML runs natively on Windows, Linux, macOS, and even mobile environments like Termux.
Clean, readable syntax that combines the best aspects of modern programming languages without unnecessary complexity.
// Pattern matching
match value {
1 => "One",
2..10 => "Small number",
n if n > 100 => "Big number",
_ => "Other"
}
Functions are first-class citizens with support for closures, higher-order functions, and functional programming patterns.
// Higher-order functions
function compose(f, g) {
return (x) => f(g(x))
}
let addTwo = (x) => x + 2
let double = (x) => x * 2
let addTwoAndDouble = compose(double, addTwo)
Optional static typing with type inference for safety without sacrificing development speed.
// Type annotations (optional)
function greet(name: string): string {
return "Hello, " + name
}
// Type inference
let users = new Map<string, User>()
let result = users.get("alice") // inferred as User?
Comprehensive standard library with modules for HTTP, JSON, crypto, file I/O, and more - batteries included.
import { http, json, crypto, fs } from "std"
// HTTP client
let response = await http.get("https://api.example.com")
// JSON parsing
let data = json.parse(response.body)
// File operations
fs.write("output.json", json.stringify(data))
Built-in security features including cryptography, secure random generation, and protection against common vulnerabilities.
import { crypto, secure } from "std"
// Secure password hashing
let hash = crypto.bcrypt("password", 12)
// Secure random generation
let token = secure.random_string(32)
// Input validation
let email = validate.email(user_input)
Powerful data manipulation tools with built-in support for CSV, XML, databases, and data analysis.
import { csv, sql, stats } from "std"
// CSV processing
let data = csv.read("sales.csv")
let filtered = data.filter(row => row.amount > 1000)
// Database queries
let db = sql.connect("postgres://...")
let results = await db.query("SELECT * FROM orders")
Comprehensive development tools including formatter, linter, debugger, and profiler - all built-in.
First-class VS Code support with syntax highlighting, IntelliSense, debugging, and integrated terminal.
Simple, fast package manager with dependency resolution, semantic versioning, and security scanning.
// Install packages
laml install express@latest
laml install --dev testing-framework
// Import and use
import express from "express"
let app = express()
app.listen(3000)
Write once, run anywhere - LAML runs on Windows, macOS, Linux, and even mobile platforms like Termux.
Seamlessly integrate with existing systems through FFI, HTTP APIs, and native library bindings.
// Call C libraries
import { ffi } from "std"
let lib = ffi.load("libmath.so")
let result = lib.calculate(42)
// Python interop
import { python } from "interop"
let np = python.import("numpy")
let array = np.array([1, 2, 3, 4, 5])
Join a vibrant community of developers building the future of scripting languages with active support and contributions.
See how LAML compares to other popular scripting languages in real-world scenarios.
Start building with the most modern scripting language available today.