v0.1 - Spicery/Nutmeg GitHub Wiki
Vision
The first draft of Nutmeg aims to provide a basic, stable platform for further development.
- It can be installed and used on Linux and MacOS.
- It will support a command-line based, compile-then-run workflow, exemplified by the
nutmegc
andnutmeg
commands. - The Nutmeg in a Nutshell manual will describe all the features of this release and an overview of the project objectives.
- This release will have sufficient features to be able to process JSON meaningfully; it is not that JSON is an objective so much as a convenient way to summarise a coherent feature set.
- Integer and floating point arithmetic
- Booleans and Null
- Characters, Strings and Symbols
- Lists and iteration over lists, var, const and val lists supported
- Records and iteration over records, var, const and val records supported
- Maps and iteration over maps, var, const and val maps supported
- Refs with var, const and val refs supported
- One signature feature will be implemented, which is sealing. Optional parameters will not be supported.
- Syntax will include
- End-of line comments and Nested comments
- Literal constants for integers and floating point. Decimal radix only (others would be a bonus).
- Literal constants for strings (no interpolation), characters and symbols.
- Literal constants for booleans and null.
- Construction syntax for Lists, Maps and Records
- Top level declarations of the form
def F(E): ... enddef
,def K = ... enddef
(the latter needs confirmation) - Simple declarations of local variables e.g.
x := 99
- Simple assignment of local variables e.g.
x <- 99
- Function calls of the form
F(E)
,E.F
andE.F()
- Updaters of the form
F( E ) <-- E'
,E.F
<-- E'and
E.F() <-- E'` - Arithmetic operators:
+
,-
,/
,*
- Short circuit operators:
and
,or
n.b.not
is a library function - Bitwise operators:
AND
,OR
,NOT
- Range operators:
E ... E
, closed rangeE ..<
E'`, half-open range
- Discard operator:
STMNTS;;
- Sequencing:
STMNT1; STMNT2
- Implicit sequencing (using newlines)
- Conditional forms:
if ... elseif ... else ... endif
ifnot ... elseif ... elseifnot ... else ... endifnot
- Loops
for ... do ... endfor