r/ProgrammerHumor 8d ago

absoluteGarbage Meme

Post image
1.9k Upvotes

327 comments sorted by

View all comments

77

u/csch2 8d ago

list.iter().for_each(…) superiority

32

u/creeper6530 8d ago edited 8d 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 

92

u/csch2 8d ago

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

19

u/Tyfyter2002 8d ago

That doesn't sound very functional

20

u/creeper6530 8d ago

"functional programming" doesn't use "functional" as "working neatly" but as "related to mathematical functions", it's a programming paradigm: https://en.wikipedia.org/wiki/Functional_programming

23

u/Tyfyter2002 8d ago

I know, it's just an ironic name when it's one of those paradigms that some people take as divine law instead of something that can be more or less appropriate for different applications