Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Dewy Language Reference

Language design. Generated coverage names measured programs and target restrictions; examples here illustrate the design.

This reference defines the intended syntax and semantics of the Dewy programming language. It is organized by language construct and is meant for answering exact questions rather than teaching the language in sequence.

For a guided introduction, read Learning Dewy.

Normative Language and Current Implementations

The main reference describes Dewy itself. A rule does not become less normative merely because the current compiler has not implemented it yet.

Language-design maturity is recorded in Design Maturity and Open Questions:

  • settled behavior is documented directly;
  • provisional behavior is documented only as far as decisions have been made;
  • unspecified behavior is identified without inventing a default.

Fresh compiler examples and target-scoped acceptance results belong to Implementation Compatibility. Those implementation notes do not redefine the source language.

Conventions

  • Dewy source conventionally uses the .dewy suffix.
  • Code labelled provisional illustrates a design whose stated portions are decided but whose surrounding rules may change.
  • T | none denotes an optional value.
  • exception is the nominal parent of values forwarded by safe navigation; both error and none descend from it.
  • intN and uintN denote fixed-width signed and unsigned integer families when a rule applies uniformly across widths.
  • “Produces” describes the value or values expressed by a construct. void means that no value is produced.
  • “Place” means a mutable storage location selected explicitly with @; it is not an accidental alias created by an optimization.

Unless a section explicitly says otherwise, evaluation proceeds from left to right within the order established by grouping and operator precedence.