Helios language/

print, error, assert

There are three builtin void functions. These can be used to define higher level user-defined void functions.

Void functions can't be used in assignments.


For debugging purposes, Helios has a special print expression. print(...) takes a String argument:

func main() -> Bool {
	print("Hello world");

Note: print expressions are useful when debugging scripts. They are however eliminated by the compiler when compiling scripts optimized for production.


Helios has a special error builtin, which can be used to throw errors inside branches of if-else expressions, and cases of switch expressions. At least one branch or case must be non-error-throwing for the if-else or switch expression to return a non-void value.

if (cond) {
} else {
    error("my error message")
    Buy => true,
    Sell => error("my error message")


The builtin assert function throws an error if a given expression evaluates to false.

assert(condition, "should be true"); ...