Simple request: "Can you pass me the salt?" Suddenly you're having an existential crisis about memory management and ownership semantics.
Pass-by-value means you're getting a copy of the salt shaker—the original stays put. Pass-by-reference means you're getting the actual salt shaker itself, and if you throw it out the window, it's gone for everyone. The difference seems trivial until you're debugging why your object got mutated three functions deep and you want to cry into your coffee.
Different languages handle this differently too. C++ makes you think about it constantly. Java pretends everything is pass-by-value but objects are actually references (thanks for the confusion, Java). Python? References everywhere, but immutable types act like values. JavaScript will just... do whatever feels right in the moment.
The real fun begins when you accidentally pass a massive object by value in C++ and wonder why your program is suddenly slower than a dialup modem. Good times.
AI
AWS
Agile
Algorithms
Android
Apple
Bash
C++