GoalsThe Kestrel Programming Language
Part of
the documentation for the Kestrel language
|
The Kestrel programming language is a refinement of Falcon, a language designed in late 2012 as a target language for a compiler construction course. Therefore, one of its primary goals is compactness. Among its other goals:
putstr( "Hello World!"+LF, output )
Arrays are a type distinct from pointers, and array subscripting is not equivalent to pointer arithmetic, following the lead of Pascal.
Leading zeros on numeric constants do not indicate a change of number base; instead, the number sign # is used, following the lead of Ada.
Breaking out of the middle of a loop is done by raising an exception, and cases of a case-select construct cannot flow into each other, eliminating the need for a break statement. (The C break statement cost AT&T a huge amount on Jan. 15, 1990 because of a system-wide long-distance system shutdown that was ultimately attributed to the dual use of break in C as both a loop exit and the final statment of each case in a case-select construct.)
In Kestrel, if a and b are pointer variables, the assignment a=b copies the pointer, and the comparison a=b compares the pointers. Explicit dereferencing is used to refer to the referenced values, so the assignment a@=b@ copies the value, without modifying any pointers, and the comparison a@=b@ compares the referenced values. This follows the lead of Pascal and avoids decisions made by the designers of Ada.