3 ms·
Parenthesis are not binary operators so the parser doesn't need to know whether LHS and RHS are identifiers or expressions. This is the same reason why D uses
by mhh__ 7y ago
Parenthesis are not binary operators so the parser doesn't need to know whether LHS and RHS are identifiers or expressions.
This is the same reason why D uses a bang (!) for template instantiation (as well as this exact syntax for declaration) - I think D is the benchmark for generics in 2020, especially alias arguments, of the C++ like languages anyway (so no Haskell!)
I also think the contract system this design and C++ have gone for is overly complicated compared to the highly extensible and extremely simple system D uses (just write if(ContractCondition!Type) between the template declaration and it's body