Pilang combines a small C implementation with language features expected from a general-purpose scripting language.
- Dynamic values: numbers, strings, booleans, nil, lists, maps, ranges, slices, objects, and tensors.
- Mutable
letvariables,constbindings, expressions, assignment operators, and assignment expressions. - Control flow with
if,elif,else,while,for,break,continue, andreturn. - First-class functions, anonymous functions, arrow functions, closures, recursion, and higher-order helpers.
- Object-oriented programming with objects, classes, constructors, methods, inheritance, and magic methods.
- Modules for organizing code and importing built-in or user-defined functionality.
- Operator support for arithmetic, comparison, logic, assignment, special operations, and overloadable behavior.
- C-based interpreter and VM.
- Garbage-collected object memory.
- Command-line execution of
.pifiles. - Built-in modules for collections, drawing, files, functional helpers, I/O, language constants, math, OS integration, plotting, statistics, strings, system information, tensors, time, and types.
- WebAssembly/browser build support in addition to the native executable.
- VS Code syntax extension files under
editors/vscode.
values = [1, 2, 3, 4];
println(values);