Linguistic Calculus
Jump to navigation
Jump to search
The Linguistic Calculus (LC) was created in 2013 and patterned after natural language and the lambda calculus, with the idea to make code that could be
- Written as prose
- Be read aloud in a consistent manner
- Interesting to write
Syntax
The syntax of LC is given by the following grammar. Please note that white space is only valid in places where white space is denoted in the grammar
program := sentence+ sentence := phrase '.' phrase := assign | apply assign := 'as' symbol ' ' body apply := 'ap' ' ' body ' ' body body := phrase | ref | lam ref := 'rf' symbol lam := 'lm' symbol ' ' body
The symbol production denotes a identifier consisting of letters
Phonetics
- Symbols are pronounced as themselves
- as- : "Assign-the-value-that-follows-to"
- ap- : "Use-the-following-value-as-parameter-in-the-function-that-follows-it"
- rf- : "In-the-current-scope-reference"
- lm : "The-function-with-the-following-body-and-parameter"
Turing-completeness
Unless I've overlooked something, this should be turing complete as it is simply a encoding of the lambda calculus