Explain SMBC — the wiki for Saturday Morning Breakfast Cereal

recursion

2019-07-06 View on smbc-comics.com → 1 revision
recursion
Votey panel for recursion
This explanation is incomplete or may contain errors. It was generated by AI and has not yet been reviewed by a human editor.

Explanation

This comic is a visual joke about recursion -- the programming and mathematical concept where something is defined in terms of itself. A person is handing out flyers that read "Problems with Recursion" with a note saying "Please take one." Another person takes a flyer, opens it up, and inside finds... another flyer that says "Problems with Recursion -- Please take one."

The joke perfectly demonstrates recursion by being recursive itself. The problem with recursion (as described by the flyer) is that it contains another instance of the same problem, which presumably contains another, and so on infinitely. This mirrors one of the most common actual problems with recursion in programming: infinite recursion, where a recursive function calls itself without ever reaching a base case, eventually causing a stack overflow. The comic is also a meta-joke: if you try to understand the problem with recursion by reading the flyer, you are sent into the same loop the comic describes. The person's exasperated "What the..." reaction captures the experience of many computer science students encountering recursion for the first time.

View History (1) Original Comic
← Previous Comic Next Comic →