Hacker News new | ask | show | jobs
by zenhack 2146 days ago
> Replacing pointer arithmetic where it's needed with array indexing stands out the most but there's other issues.

What situations do you run into where array indexing is not an acceptable substitute for pointer arithmetic?

1 comments

For the record, implementing Monocypher was not one of them. I use arrays everywhere.

The one borderline case I can cite is wiping memory. I go by sizeof() and access each byte.