Atomy is a language designed to grow. It achieves this goal by having a very simple grammar, much like Lisp. Rather than statements, everything in Atomy is an expression. These expressions are not merely written, they are designed. Readability, concision, and flow are the primary goal, and this goal is most easily achieved by keeping the grammar small, and building everything up from there with macros and metaprogramming.
data(Doc): Empty Beside(@left, @right, @space?) Above(@above, @below, @overlap?) Text(@value) Empty width := 0 Text width := @value size Beside width := if(@space?) then: 1 + @left width + @right width else: @left width + @right width Above width := [@above width, @below width] max (l: Doc) <+> (r: Doc) := Beside new(l, r, true) (d: Doc) <+> Empty := d Empty <+> (d: Doc) := d (l: Doc) <+> (a: Above) := do: first = l <+> a above rest = a below nest(l width + 1) Above new(first, rest, a overlap?)