Freya has a rich expression syntax, with several enhancements to the traditional Pascal syntax:
In many cases, this has been necesary to support all user defined operators allowed by the Common Language Runtime.
The simplest expressions you can write in Freya are literal constants:
The new operator creates and initialize instances from any concrete data types:
Freya provides literal arrays, for simplifying array initialization:
Unary operators include numeric plus and minus, logical negation and the bitwise complement:
Binary operators include the typical numeric operators, bitwise operators, comparisons and the new null coalescing operator, for working with reference and nullable types:
Freya also supports a small set of experimental features, including conditional and common expression blocks:
These new expression types add more power to the Freya expressions, and they are very useful for inline implementations and anonymous method blocks.
The Freya Programming Language
Program and file structure
Type declarations
Type members
Statements
Method calls and object paths