We are reading Crafting Interpreters at Reaktor Tampere book club. This language is heavily influenced by that book, except written in a good programming language.
Manse is a C-family style dynamically typed, interpreted language whose syntax resembles the regional dialect of Tampere, Finland.
- Variable declaration:
seonnääs nii et VARIABLE_NAME on ny VARIABLE_VALUE;
- Variable reassignment:
VARIABLE_NAME on ny VARIABLE_VALUE;
- If statements:
jos (CONDITION) ni {} mut jos ei ni {}
) - While loops:
kuha (CONDITION) ni {}
- For loops:
elikkä jos (EXPRESSION_OR_DECLARATION; CONDITION; EXPRESSION) {}
- Functions:
roseduuri FUNCTION_NAME(arg1, arg2) { kylä lähtee arg1 plus arg2; }
- Block scoped variables
- First class functions and closures
- Recursion
- Better docs
- Better, non-horrible error messages
- Fix a million edge cases, probably
- Moar tests
- Moar features
- REPL
roseduuri getClosure() {
seonnääs nii et x on ny 3;
roseduuri double() {
kylä lähtee x kertaa 2;
}
kylä lähtee double;
}
roseduuri pää() {
seonnääs nii et funcWithClosure on ny getClosure();
kylä lähtee funcWithClosure();
}
stack test
stack run <path-to-file>