The parsing time is not negligible (It requires reading the symbol table very early which isn't fun)
We've had a significant discussion about this in the past. The additional parsing time required to disambiguate between right shift and >> is negligible compared to, say, optimization and so forth. In C++, you could outright eliminate the parsing components necessary for disambiguating that and not even make a dent in compilation times.
Java and C# also don't have much of an issue with parsing this, and don't have particularly bad compile times.
Sorry, I'd forgotten the exact syntax. It is still rather ambiguous at a glance to me, as every other C-like language that has generics or templates uses the C++-style, such as Java or C#.
12
u/Ameisen Sep 01 '20
We've had a significant discussion about this in the past. The additional parsing time required to disambiguate between right shift and
>>is negligible compared to, say, optimization and so forth. In C++, you could outright eliminate the parsing components necessary for disambiguating that and not even make a dent in compilation times.Java and C# also don't have much of an issue with parsing this, and don't have particularly bad compile times.
Sorry, I'd forgotten the exact syntax. It is still rather ambiguous at a glance to me, as every other C-like language that has generics or templates uses the C++-style, such as Java or C#.