.hx files. It’s indentation-based (like Python), no semicolons, no braces.
Variables
Types
| Type | Example | Notes |
|---|---|---|
string | "hello" | Single or double quotes |
number | 42, 3.14 | All numbers are floats internally |
boolean | true, false | |
null | null | Absence of value |
list | [1, 2, 3] | Ordered collection |
dict | {"key": "value"} | Key-value pairs |
function | function greet(name) | First-class functions |
native | database.open("app") | Objects from modules |
String Interpolation
Use{variable} inside strings:
Functions
return keyword is also supported.
Control Flow
If / Else
Loops
Concurrency
Helix has native support for asynchronous tasks using thespawn and wait keywords.
Wait
Pause execution without blocking other tasks.Spawn
Run a block of code in the background (concurrently).Operators
| Operator | Description |
|---|---|
+ | Add / concatenate strings |
- | Subtract |
* | Multiply / repeat strings |
/ | Divide |
% | Modulo |
== | Equal |
!= | Not equal |
< > <= >= | Comparison |
and | Logical AND |
or | Logical OR |
not | Logical NOT |
Built-in Functions
| Function | Description | Example |
|---|---|---|
print(...) | Print values with newline | print("hello", 42) |
cleanprint(...) | Print without newline | cleanprint("loading...") |
len(x) | Length of string/list/dict | len([1,2,3]) → 3 |
str(x) | Convert to string | str(42) → "42" |
int(x) | Convert to number | int("42") → 42 |
type(x) | Get type name | type(42) → "number" |