3 ms·
> To me, it makes perfect sense to use a(i) instead of a[i]. I disagree. Square brackets links to memory, paren just returns data. Of course you could implemen
by username90 7y ago
> To me, it makes perfect sense to use a(i) instead of a[i].
I disagree. Square brackets links to memory, paren just returns data. Of course you could implement the paren function to return a reference, but it makes the code a lot harder to read since that is not the normal case. See comparison:
a[i] = 3;
or
a(i) = 3;