StackLang is a statically typed language. This typing is enforced with latent typing. There are six basic types in StackLang:
true or false. Any type.
TypeError is
thrown.
A type specialziation is when there is additional information after the type in parenthesis. For example,
a Substack(Number) is a substack of numbers. Only substacks may have a specialization. Substacks
are specialized to indicate what type they can hold. In between the parenthesis should be another type
(including further specialized types). For example, Substack(String) is a substack of strings.
A Substack(Substack(Number)) is a substack of substacks of numbers - a 2d grid of numbers.
An unspecialized Substack is a substack of any type.