Aetherlang Core
Core is something implemented in the interpreter itself. You don't need to include anything for it to work, not even base.
@ comment
f arg1...argN @-> any
@ where f: function
@ arg1...argN: any
@ calls F with given arguments. returns the result.
(exp) @-> any
@ evaluates EXP. returns the result.
:exp @-> symbol
@ quotes anything that was in EXP and returns it as a symbol that can be either evaluated with do or used as a string.
x = y @-> any
@ where y: any
@ binds name X to Y. if the name X has "aether." prefix it will be created in ether. returns Y.
function f [argnames...] = body @-> function
@ creates a function with the name F and returns it.
dim d
...
enddim d
@ separates a dimension block named D that is fully skipped by interpreter and then evaluated line by line in parallel to currently running dimensions.
ritual
...
endrit
@ separates a ritual block that is fully skipped by interpreter and then evaluated line by line in parallel to currently running rituals.
Types
ANY @ not a type
╠ number
╠ symbol ┐
╠ string ┘ @ these two are for the most part interchangeable.
╠ timepoint @ basically a marker for gotime. cannot be instantiated in the ether.
╠ void @ is used to represent the absence of value. also is the only type (and value) considered FALSE logically.
╠ function
╚ array
╚ phantomarray @ in standard libraries, any function that requires an array can also be given a phantomarray instead. not vice versa.
Functions
use libname [prefix] @-> void
@ where libname: symbol or string
@ prefix: symbol or string
@ includes all the names defined in a preinstalled library LIBNAME to the namespace. if PREFIX was given, puts PREFIX before each of these names.
Constants
dimname @ of string
@ a special name that is always equal to the name of the current dimension [or ritual since v0.2].
oargs @ of array
@ a list of extra arguments given to a function. only exists inside a function body.
[v0.2+]
true @ of number
@ constant TRUE that is equal to 1.
void @ of void
@ constant VOID of type void.