POLYTONE — the AI-native programming language

Guide

Variables & types

let binds immutably, mut allows reassignment. Types are inferred locally; function boundaries are always explicit.

variables.pt
let language = "POLYTONE"
mut counter = 0
counter = counter + 1
let pi: Float = 3.14159
print("{language} #{counter}, pi = {pi}")

The base types are Int, Float, Text, Bool, and Void, joined by List[T], Map[K, V], Set[T], Tuple[…], Option[T], Result[T, E], fn types, and your own records and enums. There is no null — absence is always an explicit Option.