this post was submitted on 12 Sep 2025
462 points (98.7% liked)

Programmer Humor

27065 readers
1018 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
[–] HappyFrog@lemmy.blahaj.zone 47 points 1 month ago (9 children)

Will this ever return? Won't it just overflow the stack?

[–] sjmarf@sh.itjust.works 79 points 1 month ago (7 children)

Yep, this will cause a stack overflow.

[–] Mad_Punda@feddit.org 25 points 1 month ago* (last edited 1 month ago)

Might very well be an endless loop because tail recursion can be optimized to reuse the stack frame. Depends on a lot of things of course.

load more comments (6 replies)
load more comments (7 replies)