Concatenative language
Other languages
Computer Science
Meta
Trith is a stack-based, concatenative, dynamically-typed functional programming language with a homoiconic program representation. - [[https://en.wikipedia.org/wiki/Stack-oriented_programming_language|Stack-based]] means that instead of having named parameters, Trith functions operate on an implicit data structure called the operand stack. Trith functions can be thought of in terms of popping and pushing operands from/onto this stack, or equivalently in purely functional terms as unary functions that map from one stack to another. - [[https://en.wikipedia.org/wiki/Concatenative_programming_language|Concatenative]] means that the concatenation of any two Trith functions also denotes the [[https://en.wikipedia.org/wiki/Function_composition|composition]] of those functions. - [[https://en.wikipedia.org/wiki/Type_system#Dynamic_typing|Dynamically typed]] means that operands to Trith functions are type-checked dynamically at runtime. - [[https://en.wikipedia.org/wiki/Homoiconicity|Homoiconic]] means that in Trith there is no difference between code and data. You can manipulate and construct code at runtime as easily as you would manipulate any other data structure, enabling powerful metaprogramming facilities. Trith programs are simply nested lists of operators and operands, and can be represented externally either as [[https://en.wikipedia.org/wiki/S-expression|S-expressions]] or as [[https://en.wikipedia.org/wiki/Resource_Description_Framework|RDF]] triples. Trith is inspired and influenced by experience with [[Forth]], [[Lisp|Lisp and Scheme]] in general, and the concatenative languages [[Joy]], [[XY]], [[Factor]] and [[Cat]] in particular. For details, see: [[https://github.com/trith/trith]]
Describe this revision:
Save