Was there any specific reason for the current template syntax?
Mojo currently uses the
Initially one would think it is to avoid the known ambiguity the latter characters can cause, however the current characters also make the grammar ambiguous.
In all of these cases the syntax is
[ and ] characters to specify templates instead of the < and > characters that we see in most other languages.Initially one would think it is to avoid the known ambiguity the latter characters can cause, however the current characters also make the grammar ambiguous.
In all of these cases the syntax is
identifier[literal](), but every case parses into a different AST. So I wonder if there was any specific reason for choosing the current syntax or it was only for using different tokens than < and >.