July 28, 2026

Call stack? More like call smack

Recursion Is Lying to You

Your "smart" shortcut may crash anyway — and the comments are fighting about whose fault it is

TLDR: A coding pattern many people trust can still crash simply because programs have physical limits, and JavaScript often fails to protect you even when the code is written the “right” way. In the comments, readers battled over whether this is obvious beginner stuff or proof that the platform itself is the real liar.

The latest edition of the "technology is gaslighting you" saga says a beloved coding trick may look neat, logical, and totally safe — right up until it faceplants into a hard limit and blows up. The article’s big reveal is simple enough for non-coders: a program can be correct and still crash if it keeps calling itself too many times. Even the supposedly safer version, where the code is rewritten to avoid piling up extra work, can still fail in JavaScript because many browsers and apps never fully adopted the promised fix. So yes, the code may be innocent — and the platform may be the one betraying you.

But the real fireworks are in the comments, where readers immediately split into camps. One side rolled its eyes with a giant “CS 101, no?”, basically saying this is ancient classroom stuff and everyone should already know loops are safer. The other side was not having that smugness. One commenter snapped, “Recursion isn’t lying to you. Rather, many JavaScript implementations are screwing you over,” turning the whole thing into a blame-the-platform drama. Then came the classic internet power move: somebody challenged the article’s Fibonacci math with a mini spreadsheet, because no coding argument is complete until someone says, “Well, actually…” The funniest flex, though, was a commenter reliving a Facebook interview where a “senior” engineer allegedly went silent the second “spatial locality” came up — a perfect humblebrag wrapped in nerd warfare. In short: the article warned about hidden limits, but the crowd turned it into a glorious fight over whether the real bug is bad habits, bad tools, or bad teaching.

Key Points

  • The article says recursive JavaScript functions can be logically correct yet still fail because each call consumes stack space until the call stack overflows.
  • A recursive sum example works for small inputs but typically throws a recursion-related error at large depths such as 100,000.
  • The article explains that tail recursion requires the recursive call to be in true tail position, often by moving pending state into an accumulator.
  • It states that many JavaScript engines do not consistently implement proper tail calls, despite ECMAScript 2015 specifying them in strict mode.
  • The naive recursive Fibonacci example is described as having exponential time complexity, which can freeze a browser tab before stack depth becomes the main problem.

Hottest takes

"CS 101, no?" — RajT88
"many JavaScript implementations are screwing you over" — Chinjut
"the minute i mentioned spatial locality, he went quiet" — a-dub
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.