When you have multiple indices you’re also bound to have multiple cardinals those indices count up to, say foo.length and bar.length, so foo_i and bar_i are perfectly legible and self-documenting. A bit Hungarian but Hungarian is good in small amounts. Unless you’re dealing with width and height in which case it’s x and y but it’s not that width_i would be incomprehensible.
When you have multiple indices you’re also bound to have multiple cardinals those indices count up to, say
foo.lengthandbar.length, sofoo_iandbar_iare perfectly legible and self-documenting. A bit Hungarian but Hungarian is good in small amounts. Unless you’re dealing withwidthandheightin which case it’sxandybut it’s not thatwidth_iwould be incomprehensible.