Skip to content
Pannous edited this page Jan 12, 2022 · 9 revisions

key-value pairs are a fundamental building block of the angle language:
hello:world is an object with name hello and value world (both unspecified symbols)

builtin data and blocks are maps of key pairs.

In fact any map is just a list of pairs and any list of pairs is a map.

Since it is the fundamental building block of wasp there is no special node type 'map'

groups of pairs are named tuples : (a:1 b:2 c:3)

⚠️ a:b != (a b)
There is a fundamental difference between key-pairs and true pairs = 2-tuples!
In key-pairs the key is always a symbol, in true pairs it can be any object.

In the node representation, the key is just the name string of the key node, unless the key also has children, in which case the the child is the key. This is useful for complex matching :

switch x:
 x > 1 : 

⚠️ a:{x:1} != a{x:1} keyNodes are different to nodes with values

Todo: we need a better name for 'key': holder vessel couple slot duo twain duplet construct piece record--

⚠️ arbitrary keys ARE possible in builtin data by using the next/children field of nodes

Home

Philosophy

data & code blocks

features

inventions

evaluation

keywords

iteration

tasks

examples

todo : bad ideas and open questions

⚠️ specification and progress are out of sync

Clone this wiki locally