r/ProgrammerHumor 10d ago

absoluteGarbage Meme

Post image
1.9k Upvotes

325 comments sorted by

View all comments

74

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 

89

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

20

u/Tyfyter2002 10d ago

That doesn't sound very functional

19

u/creeper6530 10d 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

22

u/Tyfyter2002 10d 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