Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

foreache

Name: Anonymous 2014-01-20 18:58

what is you're opinion on foreache loops?

i don't like em cuz they ache in the fore

Name: Anonymous 2014-01-21 21:33

>>12

For each (or foreach) is a computer language idiom for traversing items in a collection. Foreach is usually used in place of a standard for statement. Unlike other for loop constructs, however, foreach loops [1] usually maintain no explicit counter: they essentially say "do this to everything in this set", rather than "do this x times". This avoids potential off-by-one errors and makes code simpler to read. In object-oriented languages an iterator, even if implicit, is often used as the means of traversal.

foreach is a way of iterating over a collection. obviously i am not comparing this with loops, but loops that also iterate over a collection, which are streams

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List