Great question. My answer: use type A ('<')
- You clearly see how many iterations you have (7).
- The difference between two endpoints is the width of the range
- Less characters makes it more readable
- You more often have the total number of elements
i < strlen(s) rather than the index of the last element so uniformity is important.
Another problem is with this whole construct. i appears 3 times in it, so it can be mistyped. The for-loop construct says how to do instead of what to do. I suggest adopting this:
BOOST_FOREACH(i, IntegerInterval(0,7))
This is more clear, compiles to exaclty the same asm instructions, etc. Ask me for the code of IntegerInterval if you like.