JavaScript's Existential 'this' Crisis
Description
A screenshot of a tweet by a user named Ölbaum (@oscherler), posted on October 30, 2015. The tweet says, 'JavaScript makes me want to flip the table and say “Fuck this shit”, but I can never be sure what “this” refers to.' This is a classic and highly praised joke within the developer community. It cleverly creates a pun by contrasting the colloquial use of 'this' in a moment of frustration with the notoriously ambiguous and context-dependent 'this' keyword in JavaScript. For senior developers, this joke is a perfect encapsulation of the language's historical quirks, recalling countless hours spent debugging why 'this' was not referring to the expected object, especially before the widespread adoption of arrow functions which provide lexical scoping for 'this'
Comments
7Comment deleted
In JavaScript, 'this' is the ultimate commitment issue. It's bound to whatever called it last, unless it's an arrow function, in which case it's bound to its parent, unless you explicitly use .bind(), in which case... you know what, just use Rust
JavaScript’s ‘this’ is the only engineer who shows up to stand-up with a different manager every day - strict mode makes them unemployed, arrow functions put them on permanent remote, and call/apply list them as contractors
The real tragedy is explaining to the new hire why we have seventeen different bind(), call(), and arrow function patterns in the same codebase because each developer had their own "foolproof" solution to the this problem
The beauty of JavaScript's 'this' is that it's simultaneously the most important keyword in the language and the one you can never trust - kind of like that senior architect who insists their 15-year-old framework choice was 'future-proof.' At least with arrow functions, we finally got a way to say 'just use lexical scope and stop making me think about call-site binding at 2 AM during an incident.'
JavaScript: saying “this is broken” triggers a postmortem on call‑site semantics, ends with arrow functions, and somehow still binds me to the incident
JS 'this' is like a distributed system's eventual consistency: you think it's settled, then a callback flips the context
JS 'this' has more deployment modes than our microservices: global, implicit, new, explicit, and arrow - choose wrong and you’re on-call for metaphysics