Currently a cell can either contain statements or a single expression. At a minimum this should be relaxed to allow some statements followed by an expression.
int nonvoidFunction() {return 0;}
nonvoidFunction()
Better would be to loosen the distinction between statements and expressions so that they can be used interchangably. This would make semicolon use more predictable (eg no need to distinguish void function calls (statements) from non-void calls (expressions)).
nonvoidFunction();
a = [4];
void voidFuntion() {}
voidFunction()
For a final twist, I can't figure out how use statements fit in (they require semicolons but are one-per-cell like expressions), but they should be harmonized as well.
Currently a cell can either contain statements or a single expression. At a minimum this should be relaxed to allow some statements followed by an expression.
Better would be to loosen the distinction between statements and expressions so that they can be used interchangably. This would make semicolon use more predictable (eg no need to distinguish void function calls (statements) from non-void calls (expressions)).
For a final twist, I can't figure out how use statements fit in (they require semicolons but are one-per-cell like expressions), but they should be harmonized as well.