Strange syntax choices, Pascal/Ruby style statements with C-like type notation order?
let variable: type = value
Or do you mean pointer and array notation? let pointer: type* = address
let array: type[n] = [elem1, elem2, ..., elemn]
...at least the array type looks better to me then putting the size in front. Putting the '*' after the type is debatable though.Modula-2, p: POINTER TO INTEGER
Nim, p: ref int
Odin: p: ^int
Go: p: *int
C:
int *p;
Prefix: p: pointer to int;
Postfix: p: int pointer;
Another example.C:
int (*fp_arr[5])(int, int);
Prefix: fp_arr: array 5 of pointer to function(int, int) to int;
Postfix: fp_arr: int (int, int) pointer array 5;
This is something I was thinking about because some non-English languages use post positions instead of prepositions, and say the verb last instead of in the middle. For example, in English, you could say "He looks at me," and in some other languages, you'd say the equivalent of "He me-at looks". Instead of "I went to the bathroom" it would be the equivalent of "I bathroom-to went." And instead of "the fifth day of the month" it might be something like "month of fifth day", except "of" has the opposite meaning. I'm speaking vaguely because I've only read about such languages from a linguistics perspective, and I don't know them. Specifically, head-initial vs head-final languages: https://en.wikipedia.org/wiki/Branching_(linguistics) VAR array: ARRAY n OF type = [elem1, elem2, ..., elemn];
also doesn't look questionable to me, with or without square brackets around "n".