Fuck Haskell Long Live Java Script

Fuck Haskell Long Live Java Script
javascript-memes, functional-programming-memes, recursion-memes, haskell-memes, bad-code-memes | ProgrammerHumor.io

So someone decided to implement functional programming in JavaScript by... literally just calling functions recursively and pretending they're doing Haskell. The isEven function checks if a number equals zero (true) or one (false), then recursively calls isOdd with n-1. The isOdd function just... calls isEven back.

This is the programming equivalent of asking your roommate if they're hungry, and they respond by asking if YOU'RE hungry, and this continues until someone starves or the call stack explodes. Instead of using the modulo operator like a normal human being (n % 2 === 0), this genius decided to torture the JavaScript engine with mutual recursion.

The irony? Haskell would actually handle this elegantly with tail call optimization. JavaScript? It'll blow up your stack faster than you can say "Maximum call stack size exceeded." So yeah, "long live JavaScript" indeed—until you try to check if 10000 is even.

More Like This