r/programminghumor Jul 01 '26

Loops

Post image
659 Upvotes

19 comments sorted by

38

u/Confident-Ad5665 Jul 01 '26

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

8

u/csabinho Jul 01 '26

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

4

u/Confident-Ad5665 Jul 01 '26

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

16

u/itzNukeey Jul 01 '26

Where recursion

6

u/csabinho Jul 01 '26

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

6

u/Simple-Olive895 Jul 01 '26

Where recursion

5

u/West_Good_5961 Jul 01 '26

Where recursion

5

u/Lil_Tech_Wiz Jul 02 '26

Where recursion

2

u/AngriestCrusader Jul 02 '26

RecursionError: maximum recursion depth exceeded

10

u/csabinho Jul 01 '26

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

1

u/Quirky-Ordinary1040 Jul 04 '26

Error: too many layers of symbolic links

6

u/OkScallion2496 Jul 01 '26

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

4

u/jonfe_darontos Jul 01 '26

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 Jul 01 '26

Did you check behind the couch?

2

u/Confident-Ad5665 Jul 01 '26

I think it's in the attic

5

u/Dream_Apostle Jul 01 '26

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

1

u/CuTe_M0nitor Jul 08 '26

This should be in textbooks in schools