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
    ...

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.

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