Pythonic syntax, native performance

Classes & Inheritance

Single inheritance with super, constructors, methods, and fields.

class Point:
    init(x: int, y: int):
        this.x = x
        this.y = y

class Point3D extends Point:
    init(x: int, y: int, z: int):
        super.init(x, y)
        this.z = z

Closures & Lambdas

Full lexical closures with captured variable analysis.

square = x -> x ** 2
add = (a, b) -> a + b

define make_counter(start: int):
    return () ->:
        nonlocal start
        cur = start
        start = start + 1
        return cur

Match Statements

Pattern matching with guards and wildcards.

match value:
    case 200:        print("OK")
    case 404:        print("Not Found")
    case x if x > 0: print("positive")
    case _:          print("other")

Generators

yield-based generators that collect into lists.

define evens(n: int) -> int:
    i = 0
    while i < n:
        yield i
        i = i + 2

for v in evens(10):
    print(v)

List Comprehensions & Slicing

Full list comprehensions with conditions, plus Python-style slicing.

squares = [x * x for x in range(10)]
evens = [x for x in numbers if x % 2 == 0]

first_three = numbers[0:3]
every_other = numbers[0:5:2]
tail = numbers[1:]

Error Handling

try/catch/finally with typed exceptions.

try:
    risky()
catch IOError as e:
    print(f"IO error: {e}")
catch Error as e:
    print(f"Error: {e}")
finally:
    cleanup()

Enums & Decorators

Enum types and function decorators.

enum Color:
    RED
    GREEN
    BLUE

@cache
@log
define compute(x: int) -> int:
    return x * 2

Generics & Nullable Types

Generic type parameters and nullable type syntax.

define clamp<T: int>(x: T, lo: T, hi: T) -> T:
    ...

define find(items: list, key: str) -> str?:
    ## returns str or null
    ...

Concurrency & Channels

Goroutines and channels with CSP-style concurrency built into the language.

ch = make_chan[int](0)

define worker(id: int):
    ch <- id * id

go worker(1)
go worker(2)

x = <-ch
y = <-ch
print(x + y)

C FFI (@extern)

Call C libraries directly with zero marshaling overhead via the native C calling convention. Supports pointer types: int*, void*, char*.

@extern("m")
define sqrt(x: float) -> float

@extern("c")
define printf(fmt: str) -> void

@extern("c")
define fopen(path: str,
             mode: str) -> void*

result = sqrt(16.0)

Escape Analysis

Stack allocation for non-escaping lists, dicts, tuples, and lambda environments. Eliminates GC overhead on allocation-heavy paths.

Context Managers

Python-style with statements for resource management.

with open("file.txt") as f:
    data = f.read()

## Any object with __enter__
## and __exit__ works

const & Typed Declarations

Compile-time constants and typed variable declarations with full type checking.

const MAX_SIZE = 1024
const TIMEOUT: int = 30

count: int = 0
ratio: float = 0.5
prefix: str = ">>"

Collection Generics

Parameterized collection types in annotations: list[int], dict[str, float], tuple[int, str].

define process(items: list[int]):
    ...

define lookup(t: dict[str, float],
              key: str) -> float?:
    ...

coords: tuple[int, int] = (10, 20)

Full development toolchain

LSP Server

Diagnostics, completion, hover, go-to-definition, references, rename, formatting, inlay hints, semantic tokens, signature help, and code actions. Works with any LSP-compatible editor.

Package Manager (vslpkg)

Declarative TOML manifests, MVS dependency resolution, Git-based package distribution. No central registry. Any Git repo with a vsl.toml is a package.

Debug Flags

Dump tokens, AST, LLVM IR, resolved module paths, and GC statistics at exit. Built-in compiler introspection.

Module System

import / from ... import syntax. Multi-file compilation with automatic dependency resolution via vsl.lock.

Cross-Compilation

Target any LLVM-supported architecture with --target. Compile for ARM, RISC-V, and more from a single host. Full control over CPU model, linker, sysroot, and target features.

Batteries included

math

sqrt, sin, cos, log, pow, abs, ceil, floor, pi, e

string

split, join, replace, upper, lower, trim, starts_with, ends_with

collections

Stack, Queue, Set with push, pop, enqueue, dequeue, add, remove

io

read, write, append, list_dir, file iteration

random

randint, uniform, choice, shuffle, seed

datetime

Date, Time, now, format, add_days, diff

json

parse, stringify, JSON serialization

network

Socket, HTTPClient, TCP/UDP, HTTP GET/POST

sys

args, exit, env, time, process management