MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghumor/comments/1uksl9n/loops/
r/programminghumor • u/ExpensiveCoat8912 • Jul 01 '26 • 1
19 comments sorted by
37
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.
8
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.
4
I get that. As a developer I'm compelled to point these things out.
16
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/[deleted] Jul 01 '26 [removed] — view removed comment 5 u/Lil_Tech_Wiz Jul 02 '26 Where recursion 2 u/AngriestCrusader Jul 02 '26 RecursionError: maximum recursion depth exceeded
6
A proper immage of recursion is, if you're between two mirrors and see countless reflections of each mirror.
5 u/[deleted] Jul 01 '26 [removed] — view removed comment 5 u/Lil_Tech_Wiz Jul 02 '26 Where recursion 2 u/AngriestCrusader Jul 02 '26 RecursionError: maximum recursion depth exceeded
5
[removed] — view removed comment
5 u/Lil_Tech_Wiz Jul 02 '26 Where recursion 2 u/AngriestCrusader Jul 02 '26 RecursionError: maximum recursion depth exceeded
2 u/AngriestCrusader Jul 02 '26 RecursionError: maximum recursion depth exceeded
2
RecursionError: maximum recursion depth exceeded
10
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
1
Error: too many layers of symbolic links
One time I made a while true loop, I wondered why my phone didn't charge
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
3
Did you check behind the couch?
2 u/Confident-Ad5665 Jul 01 '26 I think it's in the attic
I think it's in the attic
The "while(true)" one is so funny XD
This should be in textbooks in schools
37
u/Confident-Ad5665 Jul 01 '26
If/else and switch are conditional statements, not a loop.
16
u/itzNukeey Jul 01 '26
Where recursion
10
u/csabinho Jul 01 '26
The one in the middle is
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'
4
u/joost00719 Jul 02 '26
4
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