2 ms·
Why would we need a function keyword?
by foota 2y ago
Why would we need a function keyword?
- 3836293648 2y agoYou don't strictly need it, but you get rid of a bunch of ambiguities in the grammar. Not that it'd solve all the ambiguities in C++. Is a<b, c>(d) a function call or two comparisons combined with the stupidest operator in the language? Impossible to know without type information. (This is also why rust has the super ugly ::<T> for generics, so that it's unambiguous)