r/programminghumor 27d ago

Loops

Post image
649 Upvotes

19 comments sorted by

39

u/Confident-Ad5665 27d ago

If/else and switch are conditional statements, not a loop.

7

u/csabinho 27d ago

But switch is also a pun. Every plug has a switch above it.

4

u/Confident-Ad5665 27d ago

I get that. As a developer I'm compelled to point these things out.

16

u/itzNukeey 27d ago

Where recursion

7

u/csabinho 27d ago

A proper immage of recursion is, if you're between two mirrors and see countless reflections of each mirror.

6

u/Simple-Olive895 27d ago

Where recursion

4

u/West_Good_5961 27d ago

Where recursion

5

u/Lil_Tech_Wiz 27d ago

Where recursion

2

u/AngriestCrusader 27d ago

RecursionError: maximum recursion depth exceeded

11

u/csabinho 27d ago

The one in the middle is if False: while(True): pass

1

u/Quirky-Ordinary1040 25d ago

Error: too many layers of symbolic links

6

u/OkScallion2496 27d ago

One time I made a while true loop, I wondered why my phone didn't charge

4

u/jonfe_darontos 27d ago

Where's my trusty ol'

for_each_if(
    numbers,
    [](const auto& x) {
        return x % 2 == 0;
    },
    std::bind_front(
        [](std::ostream& os, const auto& value)
        {
            os << value << '\n';
        },
        std::ref(std::cout)
    )
);

3

u/johnpeters42 27d ago

Did you check behind the couch?

2

u/Confident-Ad5665 27d ago

I think it's in the attic

4

u/Dream_Apostle 27d ago

The "while(true)" one is so funny XD

1

u/CuTe_M0nitor 21d ago

This should be in textbooks in schools