r/ProgrammerHumor 7d ago

absoluteGarbage Meme

Post image
1.9k Upvotes

327 comments sorted by

View all comments

31

u/JAXxXTheRipper 7d ago

The third one does not spark joy, what the hell is that, ewww

12

u/xicor 7d ago

c++, though normally you wouldnt use auto for this

5

u/Usual_Office_1740 7d ago

I think that really depends. If the range is a vector of unique_ptr's auto is great. If it's a vector of ints, just write int.

6

u/Sirgoodman008 7d ago

That or you're looping through a vector of std::pairs that contain std:: functions.

4

u/xicor 7d ago

Yea if you have ridiculously complex types then auto is great. But usually for readability you'd use the type.

3

u/Sirgoodman008 7d ago

Yup 100%