A general-purpose programming language for front-end apps, back-end services and smart-contracts. It is:
Fast: no garbage-collection, optimal beta-reduction and a massively parallel GPU compiler make it insanely fast.
Safe: a type system capable of proving mathematical theorems about its own programs make it really secure.
Simple: its entire implementation takes <1k LOC, making it a simple standard you could implement yourself.
Theorem proving is possible due to dependent types, like on other proof assistants. Massively parallel evaluation is possible due to Symmetric Interaction Calculus (SIC), a new model of computation that combines the best aspects of the Turing Machine and the λ-Calculus. No garbage-collection is possible due to linearity: values are simply freed when they go out of scope. To use a variable twice, we just clone it: SIC's lazy copying makes that virtually free. With no ownership system needed, we have Rust-like computational properties with a Haskell-like high-level feel.
To try the version without linearity checks:
# Installs formality npm i -g formality # Enters the example repository git clone https://github.com/maiavictor/formality cd formality/examples # Checks the proof of Nat induction formality Nat.induct # Evaluates 2 + 1 (Scott-encoded) formality '(Nat.add Nat.2 Nat.1)' # Evaluates 2 + 1 (Church-encoded) formality '(Cat.add Cat.2 Cat.1)'