A programming language with a pure syntax.
Warning
This language is still WIP. The following sections are just a proposal and subject to change.
Pure uses forward polish notation, i.e. function names are followed by their arguments. Arguments are matched by the amount of return values a function provides.
let a int 1
let b int 2
let c add a b
Arguments are parsed depending on their type.
int 1
float 0.1
str "Hello!"
# "Comments are actually just expressions with no return value."
Variables make it possible to refer to a value and override it. They can only be accessed after the first assignment.
set a int 1
set a add a 1
Aliases make it possible to refer to a value, but not override it. Thus, they can only be set once. However, they can be accessed from anywhere.
let b a
let a int 1
Functions can be declared by creating an anonymous function and creating an alias for it.
let inc fn a fn b
set a add a b
Type guards can be used to limit the types of a function's parameters. They can be any function that has a specific type of parameter types. Usually, all possible parameter types are inferred.
let inc fn a fn b
num ref a
num b
set a add a b
ref
int
flt
str
fn
struct
union
opt
res