Skip to content
pannous edited this page Oct 17, 2026 · 12 revisions

Data in Angle is node / map based.

The fundamental data type in Angle is a node, which may have a value or children, thus acting as list or map!

Just like how in lisp everything is a list, in angle everything is a map.

Or internally: a node with internal kind, parent, children and values.

Peter{address="Home 1"}

is internally represented as

# sketch: a nested node (cut short)
Node{
 name="Peter"
 children={
   Node{
     name="address "
     value=Node{
         name="Home 1" 
         type=string
     }  
  }
}

Nodes acting as lists and maps simultaneously may feel a bit unfamiliar for developers of other languages but it becomes natural after a while: {a:b c:d} => a(value:b next:c(value:d))

The value property can hold many different types and will soon be unified with the children property:

{a{b c} d:e} => a(children:[b c] next:d(value:e)) => {a{b c} d:e} => a(value:(b next:c) next:d(value:e))

Nodes from warp code

data … keeps code as a node instead of running it; warp code reads its parts and builds new ones:

p = data (x: 3)
[p.key, p.value, p.op, p.name]   // [x 3 ":" "x"]
c = data f(1, 2)
c.bracket                        // "("

symbol("x"), key(left, op, right) and bracketed(items, "(") build nodes; a list keeps its separator (commas = data [a, b] gives commas.separator ","), and separated(list, ";") sets another. A built list equals the written one: bracketed([1, 2], "(") == (1, 2) and separated([1, 2], ";") == [1; 2] are true. A node that is no group has no bracket: data x gives .bracket and .separator ø, so n.bracket != ø tests for a group at any depth. No items is the empty list whatever the bracket: bracketed([], "(") is ø, as () parses. parse(text) gives the same nodes; a parsed {a; b} is a list of its statements, and a parsed class P {x: int} is a type declaration node.

Home

Philosophy •

data & code blocks

features

inventions

evaluation

reflection

W0 types, proved

keywords

standard library

use modules & cargo crates, script mode

iteration

switch & pattern matching

warnings & strict

tasks

time & units

html pages

the warp command

examples

todo : bad ideas and open questions

⚠️ specification and progress are out of sync

Clone this wiki locally