Relatively simple language, like Oberon-2 in surface syntax, with type extension and type bound procedures, but with Modula-3 structural type equivalence, initializers, and structured literals.
Algol-68ish syntax, but simpler. Terse type declarations.
- UTF-8
- Exceptions
- Structured literals.
TYPENAME { ... }
Or should it just be TYPE? - Initializers.
VAR i, j: INTEGER := 0;
setsi
andj
to zero. - Structural type equivalence.
- Does Modula-3 allow you to return arrays from procedures?
- Allow compound blocks in expressions. They'd have to return a
result (add keyword
RESULT
?), and {} is already used for structure initializations, and I'm not sure the added expressiveness is worth the extra complication. - Modula-3 style ARRAYs would be nice (
ARRAY [-10..10,-10..10] OF INTEGER
), but those depends on ranges and would make things more complicated. Oberon'sARRAY 10, 10 OF INTEGER
will work fine.
- Dynamic strings (ARRAY OF CHAR) and other ARRAYs.
- Tables/Dictionaries.