this post was submitted on 05 Feb 2025
133 points (84.8% liked)

Programmer Humor

22717 readers
1053 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 40 points 2 months ago (4 children)

is tail recursion really recursion?

[–] [email protected] 26 points 2 months ago (1 children)

I wouldn't even really call this recursion. This is closer to a wrapper around the enjoy function to set variables so that "enjoy" doesn't throw an error.

[–] [email protected] 8 points 2 months ago (2 children)

The more accurate, yet not at all funny interpretation

[–] [email protected] 4 points 2 months ago

I find it as funny as the original post

[–] HeckGazer 1 points 2 months ago

The best kind of funny

[–] [email protected] 18 points 2 months ago

Depends on your optimization level.

[–] MajorHavoc 9 points 2 months ago

Oh. Now I get it. Thanks.

[–] [email protected] 1 points 2 months ago

Yes.

Structure and Interpretation of Computer Programs makes a distinction between recursive procedures and recursive process. A recursive procedure calls itself, but the compiler or runtime could potentially process it in an iterative way. The stack won't blow up. A recursive process, however, will always blow up the stack if left unchecked.