2 ms·
This is why Odin does not have first class pointer arithmetic and has first class support for slices. I have found in practice that I don't actually need pointe
by gingerBill 7y ago
This is why Odin does not have first class pointer arithmetic and has first class support for slices. I have found in practice that I don't actually need pointer arithmetic most of the time as slices solve that function.
The reason pointer arithmetic is so useful in C is because of its lack of array types, like slices. `x[n]` is the same as `*(x + n)` which means in C, you can do the "wonderful" trick of `n[x]`.