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

Programmer Humor

27512 readers
1029 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
[โ€“] Knock_Knock_Lemmy_In@lemmy.world 3 points 2 months ago* (last edited 2 months ago) (1 children)

Hmm.

isEven(-2)...<out of stack error>

[โ€“] killingspark@feddit.org 3 points 2 months ago

Nah, tail recursion optimization can just reuse the same stack frame again and again. It's going to loop until it wraps around what ever integer width it has and then tells you if the biggest integer is even or odd. Or, if it's nice, it's going to complain about the wrap around