Input & Output

Luma’s core library provides a small set of built-in functions for interacting with the outside world.

This section focuses on Input & Output (I/O) – how programs talk to users and the environment.

At the moment, Luma’s I/O story is intentionally small and clear:

  • print(...) - send values to standard output (console)
  • wait(...) - (planned) typed user input helper
  • read_file(...) - (planned)

More I/O primitives may be added over time, but the goal remains:

Make simple things simple, and keep everything explicit

print(...)

print is the primary way to send text to the console.

It supports:

  • basic values (int, float, bool, str, byte)
  • collections ([T], {K: V})
  • optionals (?T) – printing nil explicitly as nil
  • interpolated strings

Example:

name: str = "Luma"
age: int = 2

print("Hello ${name}, age ${age}")
// Hello Luma, age 2
Last updated on