Expressive Literals - caffeine-suite/caffeine-script GitHub Wiki

CaffeineScript's powerful, expressive literals allow you to construct complex data-structures in a way that mirrors your data, rather than disfiguring your data because of the constraints of the language. The goal is to be able to create data-structures which are easy to read. To do this, we need to apply graphical design:

  • proximity: authors can communicate the relatedness of things by putting them near each other
  • alignment: Alignment is another way to show what is related to what. It also makes it easy to ignore parts that aren't currently relevant.
  • whitespace: balance of white-space to content is important for easy reading
  • contrast:
  • repetition: specifically, repetition of form allows the coder to communicate to the reader what data structures have the same form, vs structures which differ

Alignment is key to presenting data in an easy-to-read way. As such, the CaffeineScript-literals are designed to work well in columns and rows, with indentation to establish hierarchical relationships. Visual clutter, symbols, keywords and formatting have been virtually eliminated, to allow you to express your data in the cleanest way possible.