Mandated

Function name and open paren

The define generic or define method declarations must have a space or newline between the name of the definition and the parameter list. At any function call site, the name and open paren must be adjacent, with no intervening characters.

Wrapping let statements

If a let statement wraps, you must put the equal sign on a new line and indent it one extra indent level.

Terminate statements with semicolons

Semicolons are terminators and must appear wherever they are optional, except as covered by the "Single-line statements" mandate.

Single-line statements

Single-line statement, such as if-else, must not have any internal semicolons. If a single-line statement requires an internal semicolon, then you must break the statement into multiple lines. For example, the following would be illegal in Gwydion style:

let x = if (some-test) foo(); 3; else 5; end;
let x = if (some-test) foo(); 3 else 5 end;
let f = method (a, b) foo(); #f; end;

These should be formatted as follows (ignoring the end if issue):

let x = if (some-test)
   foo();
   3;
 else
   5;
 end;
let f = method (a, b)
   foo();
   #f;
 end;

Most programmers felt this rule, by its nature of eliminating multiple statements within a block on a single line, made code much more readable.

Wrapping arithmetic/boolean expressions

You must wrap long expressions before operators and indent the operators with one extra indent level from the beginning of the expression. Note, assignments are considered to be "statements", and the "expression" that wraps is the code on the right-hand side of the assignment operator. Therefore, the first two examples below are considered to be approved style, but the third is not:

my-local := big-computation(arg1, arg2)
       + another-hairy-long-calculation(arg3, arg4, arg5)
my-local := (big-computation(arg1, arg2)
        + another-hairy-long-calculation(arg3, arg4, arg5))
my-local := big-computation(arg1, arg2)
  + another-hairy-long-calculation(arg3, arg4, arg5)