3 ms·
int main() printf("hello"); } This is perfectly reasonable and has precedent in one of Wirth's languages (modular 3? Oberon?): /* Syntax from m
by _a_a_a_ 3y ago
int main()
printf("hello");
}
This is perfectly reasonable and has precedent in one of Wirth's languages (modular 3? Oberon?):
/* Syntax from memory, may be wrong */
function main(): integer
println("hello");
end;
This does potentially break a symmetry in the language as to how a begin…End / {...} local block can be declared, but whatever, that's easily fixed.
I don't see how this would make any particular issue for bracket matching (except one of the brackets isn't there, you match to something else such as the start of the function) and lexing/parsing is fast.
Just as a suggestion buy if everybody here actually write their own compiler, even a simple one, perhaps there would be less bikeshedding.