wiki:BigIdeas/Conventions

Convention over Configuration

Conventions based on reasonable evolved defaults is the way.

Follow the principle of Less Astonishment.

Established conventions

  • "The cat sat on the mat" a string
  • 1, 2 a sequence of elements (separated by comma) of an array or a list
  • [ ] - a linear ordered sequence
  • { } - the notion of grouping, a basic block, a deep (non-linear) structure.
  • * for zero-or-more values (a multiplicator)
  • _ as a placeholder (discarded/unused value)
  • /a/b for a accessing elements of a hierarchical tree-like structure (path)
  • p.x for referencing of a property/element of a compound value (structure)
  • a[1] selecting an element of a sequence by index
  • d["key"] selecting a value for a given key
  • key: val the notion of association (a mapping)

See also BigIdeas/Declarative, JSON

Last modified 2 years ago Last modified on Nov 3, 2017, 5:53:04 AM
Note: See TracWiki for help on using the wiki.