It's subjective. It feels more c like and natural to me to write while (foo->bar) and not while (foo[i].bar). The latter feels like the way you would do it somewhere else, grafted onto C. But it's not wrong, I don't have deep qualms with it, and that's why I put it last on my list.
It's not subjective. Intel's guidelines for writing vectorizable code:
Prefer array notation to the use of pointers. C programs in particular impose very few restrictions on the use of pointers; aliased pointers may lead to unexpected
dependencies. Without help, the compiler often cannot tell whether it is safe to vectorize code containing pointers.
What are the odds this turns out to be practical advice for this example? Are you going to write all your loops like that because someone at Intel told you it was a good idea, or are you going to measure it when it's seen to be a problem?
The poster did not sum values. They used the loop to call into printf. I'm guessing they didn't also use those particular compiler options... What you have here sounds like a lot of tuning that does not apply equally for all scenarios.
I would have to agree. IMO it lends itself to cleaner code if you're working with NULL terminated lists, especially if you use a `for` when doing the iteration instead of a `while`:
const char **a;
for (a = job->accomplishments; *a; a++)
printf(" - %s\n", *a);
And
job_t *j;
for (j = jobs; *j; j++)
print_job(j);
The person who wrote this code seems to dislike `for`s for some reason it seems, these are pretty obvious places to use one IMO, using an index `i` or not. Doing it with a `while` separates out the initialization, condition, and increment in his code, and 'continue' won't work like you normally want it too.