HEXOLANGGitHub ↗

Type system

Gradual typing and built-in type names.

Hexolang supports inferred declarations and optional type annotations. The overview lists int, float, number, string, bool, any, void, function, nil, and ptr.

Compound forms include arrays, function types, user-defined types, nullable values, and unions. Example union syntax: int | string result = 42;

hexo
let age = 16;
let username = "Hexo";
int score = 100;
float ratio = 3.14;
any value = "hello";
value = 42;
Last updated 2026-11-21Suggest an edit ↗