Nutmeg in a Nutshell
»»» Work in Progress «««
Nutmeg is a teaching-oriented imperative programming language that aims to provide seamless integration of the individual features of functional programming. This includes the ability to write higher-order functions, as do most modern programming languages. However, Nutmeg goes further and supports abilities such as:
- Declaring functions side-effect free and/or to only work on immutable values.
- Both mutable and immutable versions for all built-in classes.
- Copy-on-write updating of objects.
- Deferring individual expressions to be evaluated lazily and/or declaring function bodies to use lazy evaluation throughout.
- ‘Locking' values against change temporarily or permanently.
Temporary list of contents
While we are still developing Nutmeg, this guide is very far from complete. However, here are a few in-progress documents you may find useful.
- Tokenisation Rules as EBNF Grammar and as a railroad diagram.
- Nutmeg Syntax as EBNF Grammar and as a railroad diagram.
- Assignments - a page on assignment in Nutmeg.
- Comments - a page on comments in Nutmeg.
- Compiling and Running Programs - a page on how to use the nutmeg and nutmegc commands.
- For syntax - a page on of
for
loops i Nutmeg. - If Syntax - a page on the
if
conditional in Nutmeg. - Ranges - a page on ranges in Nutmeg.
- Statements - a page on the syntax of statements.
- Unit tests - a page on the built-in unit-test framework.
- Variables - a page on the different kinds of variables.