Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 636 Bytes

homiconic.rst

File metadata and controls

21 lines (14 loc) · 636 Bytes

Homoiconic Syntax

A language is considered homoiconic if the language itself can be represented with primitive data structures.

Disp satisfies that, as the language itself can be represented with only the following data structures:

  • lists
  • maps
  • TBD: sets

Easy to Transform

By using simple data structures, it reduces the complexity of transforming the ast in various ways. For example, one can easily add a match condition by reading in a map and adding a key-value branch:

// add false to the syntax tree.
macro! add-false-handler [map-foo]
  add map-foo false