3 ms·
Doesn't [ ] have similar problems? Suppose I write: a[x](z) Is that a read of array a with index x followed by a function invocation with the parameter z. Wh
by chvid 6y ago
Doesn't [ ] have similar problems? Suppose I write:
a[x](z)
Is that a read of array a with index x followed by a function invocation with the parameter z.
Where it could also be a type conversion of z into generic type a of x.
- earthboundkid 6y agoThe issue isn't the interpretation; it's the parsing. It doesn't matter to the parser in this case if x is a type or an int. You'll have the same AST either way. But if you have f<a,b>(x), it matters if this is a generic or a pair of comparisons because the AST would be totally different.