this post was submitted on 09 Jul 2023
629 points (94.0% liked)

Programmer Humor

32371 readers
449 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] spauldo@lemmy.ml 1 points 1 year ago

foreach is useful when you don't need to know the index of something. If you do, conventional i, j, k, etc. are useful.

A lot of it depends what you're doing (number crunching, for instance) or if you're in a limited programming language (why won't BASIC die already?) where parallel arrays are still a thing.