!Tautologos (Archived)

From Esolang
(Redirected from !Tautologos)
Jump to navigation Jump to search

!Tautologos is an esoteric programming language by User:Rdococ derived from Tautologos and Table. It was intended to be the 'reverse' of Tautologos before it was confirmed to be uncomputable.

Semantics

!Tautologos has three types. These are functions, tables and symbols. This is the intended 'reversal' from Tautologos, a language based on the lambda calculus with only functions. It's best you try not to think about it too hard, given that Tautologos itself was a reversal of Table.

A program is a set of declarations assigning symbols to values, whether they be functions, tables or other symbols. Symbols that have been assigned resolve to the assigned value, while symbols that have not resolve to themselves. Functions may have parameters, another way to assign symbols, and return values. Tables are mappings from values to other values, and table keys are resolved in the same way as values (i.e., if x is assigned, [x: y] maps the assigned value of x to y.)

At its core, !Tautologos is a variant of the lambda calculus with records. This makes it purely functional and highly object-oriented.

Examples

true = {x, y: x};
false = {x, y: y};
zero = [Apply: {f, x: x}];
succ = {n: [Apply: {f, x: f(n[Apply](f, x))}]};

counter = [New: {value: [Increment: {n: counter[New](succ(n))}, Value: value]}];