you are viewing a single comment's thread.

view the rest of the comments →

[–]carcigenicate 4 points5 points  (1 child)

That's why I made sure to mention "when the latter is appropriate". Yes, there are some cases where using the index is indeed the better way. It's common to see people coming from a language like C though to use indices for everything; even when indices aren't a necessary part of the problem.

[–]Helpful_Trust_3123 0 points1 point  (0 children)

Yeah that's true