Pika has two constructs, the Description and the Potential.
- Name: The name of the Description, a String of text) in programming terminology.
- Properties: The list of statements that comprise the Description. In programming terms, an
Array
of Properties.
The Description lives in a four dimensions world:
- Typing: The Description is possibly an extension from another Description, the Type. This Type properties are retrieved as properties of this very Description, but when written upon, they are written in the local Description so to override but not overwrite. The Type can be acceded by the "Type" message or the special character (still to be determined). When actualizing the Description, the Typing dimension flattens in a single moment as the virtual aggregate Description and its consequently actualized with the Argument. The Type of the Description that results from the Potential of other Description, its Type is the original description. In this sense, there is no assignation of references, just actualization without arguments (the actualized Description gets a new name but keeps all the properties).
When accessing properties of properties of the Type, the same effect occurs as with direct properties: the accessing is done verbatim, but when writing occurs, its performed on a differential of the Type property in the local Description.
In the abstract graph (previous to Potential actualizations) the Type can be a Potential.
Note: All the Type ancestry is accessable via the message "Typing". In both the Type and Typing messages the returned value is a true reference to the original Description, not a "contextualized" one, so changes are reflected directly into the hierarchy.
-
Ancestry: The Description can be embedded in another Description, the Parent, from which properties are recursively retrieved when missing from the local description and the Type. The Parent can be acceded via the "Parent" message. The full ancestry can be seen as a list with the "Ancestry" message.
-
Delegation: When a Description is actualized inside another Description, the actualized form keeps the Parent, adds a step in the Typing and sets the Sequence to the corresponding by the Potential. The Delegate is the context Description where the actualization is performed, the Potential's Caller. The Delegation chain is useful so to locate Descriptions that perform actions related to the Delegate rather than to the parent, enabling something like Swiss inheritance where some properties are imported besides the Type.
-
Sequence: The Description is declared always as a Property of another Description. The list up to the point where this Description's Property can be found is the Sequence, and the Description just before this is known as the "Previous". Both the Previous and the full Sequence are accessible via the "Previous" and "Sequence" messages.
- Subject: A Description which acts as the Type for the potential.
- Argument: A Description which serves as object for the Subject's potential.
- Actualization: The univocal Description which will receive the result of this Potential's actualization.
The Potential has a unique dimension, the Stack:
- Stack: The Potential is actualized within a Description that is not necessarily the parent Description of the potential's Subject; the current Description, which can be also called the Parent of the Potential, is called the
Caller
. TheStack
represents the list of parents of the current Potential and the successive actualizations from which the current one was recursively called. This is the most "transversal" dimension in Pika, and I think a true innovation since no other language gives you the ability to scale back in the call stack and modify a caller. The Caller and the Stack are accessible throw the "Caller" and "Stack" messages.
The Name property of the Property makes sense only in the context of unresolved assignations. This raises a question, should unresolved assignations be represented in the abstract syntax tree? My guess it that they should not: so the right path might be to represent assignations as Descriptions which Type has not yet been resolved, similar to promises. Since this is an idea still under development I haven't yet explored the consequences of this approach.
Thinking aloud, it looks like for this to make sense the pending Type may sometimes be an Actualization instead of a Description, rendering the Type dynamic until the Actualization is performed. This is because while regular assignations (assignations of Descriptions) look simplifiable, assignations that point towards an Actualization need the Actualization to be resolved prior for the Type of tht Description to be set.
Corolaries: