Values
Oryn checks types before execution. A binding gets its type from its
initializer, so count := 42; binds an integer and ready := count > 0;
binds a boolean. An operation fails to compile if an operand has the wrong
type. Both operands of && and || are checked, even when one would be
skipped at runtime.
Integers
Oryn stores integers as signed 64-bit values. Integer literals are written
in decimal, such as 42. Arithmetic can produce negative values.
Booleans
The boolean literals are true and false. You can bind them to names or
use them directly as conditions.
Strings
Use double quotes for a string literal. A string can contain Unicode text,
and // inside a string is literal text. String literals cannot contain
line breaks, and escape sequences are unsupported.
message := "hello, 世界";
print(message);
<- message;
This file prints hello, 世界 and returns the string to the host.
Memory management
Oryn manages string memory automatically. A garbage collector can reclaim a string once it is no longer reachable from the program’s live values. Each execution has its own heap, which is released when execution ends.
Strings passed to native functions or returned to the host are copied into owned Rust values. An embedder can keep a returned value or clone a callback argument for use after execution.