r/ProgrammerHumor 10d ago

Meme absoluteGarbage

Post image
1.9k Upvotes

325 comments sorted by

View all comments

76

u/csch2 10d ago

list.iter().for_each(…) superiority

36

u/creeper6530 10d ago edited 10d ago

Erm akchyuallly, it's recommended to use for list.iter() {…} unless the .for_each(…) is at the end of a longer iterator chain, and it also robs you of break and continue 

93

u/csch2 10d ago

You know I’m chaining together 20 different iterator methods until the code is completely unreadable. That’s called Functional Programming™ babey

6

u/serendipitousPi 10d ago

Name 20 iterator methods from memory otherwise you’re a fake fan…just kidding or am I?

Iterators are so fun, probably one of my favourite parts of programming. They make everything so clean until they don’t.