Standard Library
The Arden Standard Library (std) provides core functionality for building applications.
Modules
- Math: Mathematical functions and constants.
- Str: String manipulation utilities.
- Time: Time retrieval and sleeping.
- File: File system operations.
- System: System-level interactions (exit, getenv, etc.).
- Args: Command-line arguments.
- Collections: Built-in List and Map types.
- I/O: Console input and output.
Import Behavior (Important)
The stdlib is implemented as compiler intrinsics, but import behavior is split:
print,println, andread_lineare free functions instd.ioand should be imported:import std.io.*;(or specific function imports).
- Module-style APIs such as
Math.*,Str.*,Time.*,System.*,File.*, andArgs.*are intrinsic objects and are available directly in the current compiler. - Builtins like
to_string,range,exit, and assertion helpers (assert*,fail) are available without import. - Those builtins can also be stored in typed function values, for example
conv: (Integer) -> Float = to_float,build: (Integer, Integer) -> Range<Integer> = range,check: (Integer, Integer) -> None = assert_eq,stop: (Integer) -> None = exit, andfail_now: () -> None = fail. - Direct stdlib object members can be stored as typed function values too, for example
cwd: () -> String = System.cwd,sleep_ms: (Integer) -> None = Time.sleep,argc: () -> Integer = Args.count, andrand: () -> Float = Math.random.
There are no external .arden stdlib source files; calls are lowered directly by the compiler/codegen pipeline.