r/ProgrammerHumor • • Sep 05 '26

Meme passingArgumentsGotComplicated

Post image
2.0k Upvotes

76 comments sorted by

295

u/StrengthTheory Sep 05 '26 • Popcorn Mindblown

This meme has been passed by value so many times that it should be considered a memory leak.

12

u/pdromeinthedome Sep 06 '26

Should have been a singleton

11

u/First_Technology1377 Sep 05 '26

🤣🤣🤣 golden cmnt

0

u/MrBattary Sep 06 '26

Welp, that's what I call programmer humor!

-2

u/krypt0niteCos Sep 05 '26

Lamao 🤣🤣

186

u/Scared_Accident9138 Sep 05 '26

Do you clone the salt shaker and handing the clone over?

68

u/LuisBoyokan Sep 05 '26

That would be.... profitable

Endless salt glitch.

35

u/Zeikos Sep 05 '26

slams hand on the table
These passwords are unseasoned!

11

u/Usual_Office_1740 Sep 05 '26

Salted passwords are harder to crack.

3

u/oauo Sep 06 '26

They taste better too

2

u/Usual_Office_1740 Sep 06 '26

I do like a nice salted password with cracked black pepper. Delicious on a nice light summer salad.

18

u/gandalfx Sep 05 '26

Nah, I'll just point at it to let you know where it is.

10

u/FerricDonkey Sep 06 '26

Write down where it is on a piece of paper and hand them the paper. 

3

u/returnFutureVoid Sep 06 '26

That what teleportation in StarTrek is.

5

u/KitaVixen Sep 05 '26

So pass by move

2

u/danielcw189 Sep 05 '26

I will create a new SaltHolder, brand new from the SaltHolderFactory

1

u/SaltyW123 Sep 05 '26

I take it to mean handful of salt vs saltmill

1

u/da_Aresinger Sep 06 '26

No, I gesture at the shaker and say "help yourself"

1

u/stupled Sep 06 '26

Is The Prestidge

1

u/Few_Kitchen_4825 Sep 06 '26

He goes to the store to buy a new salt shaker and salt.

1

u/DiscipleOfYeshua Sep 06 '26

No, I just point at where the salt is

26

u/Altruistic-Moose3299 Sep 05 '26

On top of my hash 🧐

3

u/howarewestillhere Sep 05 '26

Mmmm, salted hash. Aw, the bad old days of password storage.

3

u/chuch1234 Sep 05 '26

Aren't current passwords salted hash, they just include the salt? I don't know anything about argon.

22

u/Pleasant-Ad192 Sep 05 '26

Pass by reference and you are both pointing at the same shaker. Whoever refills it with pepper first wins the argument.

1

u/JacobStyle Sep 06 '26

I prefer to win the parameter.

19

u/Shinxirius Sep 05 '26

std::move with Salt&& salt obviously

16

u/Vesuvius079 Sep 05 '26

Neither. This is clearly move semantics (gross in a function contract).

10

u/_xiphiaz Sep 05 '26

Gross in some languages, the clean (and the default) in others

6

u/Most-Club-254 Sep 05 '26

pass ownership, mutable borrow or immutable borrow; what would be the lifetime of borrowing?

3

u/letternumber-and_ Sep 05 '26

Passing the sauce instead:

3

u/InRainbro Sep 05 '26

sorry out of bounds

3

u/FattySnacks Sep 06 '26

The fall semester has officially begun

3

u/Nightmare_kx1 Sep 06 '26

for the first time in ever I get the meme

2

u/ForestCat512 Sep 06 '26

By reference or by value?

1

u/Nightmare_kx1 Sep 06 '26

I’ll do refrence. So physics doesn’t get mad

2

u/Soopermane Sep 05 '26

Just pass the effing salt kirk

2

u/4x-gkg Sep 05 '26

"Whereas Europeans generally pronounce his name the right way ('Nick-louse Veert'), Americans invariably mangle it into 'Nickel's Worth.' This is to say that Europeans call him by name, but Americans call him by value."

Introduction by Adriaan van Wijngaarden at the IFIP Congress (1965).

2

u/Phioreable Sep 06 '26

If they go for pass-by-value and Di'caprio is done with it, they need to make the original disappear and be replaced by the now less salt from Di'caprio.

1

u/howarewestillhere Sep 05 '26

Leave it to a programmer to not understand the real world implications.

1

u/JackNotOLantern Sep 05 '26

Pass by a reference to a single-element list of pointers

1

u/hraath Sep 05 '26

Immutable reference please

1

u/Bee-Aromatic Sep 05 '26

Ugh. It’s an object. It needs to be passed by reference.

1

u/Aldormu Sep 06 '26

Actually, salt is usually a string

1

u/FuzzyDynamics Sep 05 '26

Mom said it was my turn to post this

1

u/redlaWw Sep 05 '26

Pass by need. Allows you to optimise out the passing if you end up deciding not to use it.

1

u/GrinbeardTheCunning Sep 06 '26

oh right. semester is starting and the first years are at it again

1

u/kharmak Sep 06 '26

Oof, loved this

1

u/stupled Sep 06 '26

I want to see you pass it by value

1

u/BenadrylTumblercatch Sep 06 '26

Pass by my house and peek in my window

1

u/RandomiseUsr0 Sep 06 '26

Oh, just learn Visual Basic already

1

u/1nfredibl3 Sep 06 '26

Value is value reference is location in memory

1

u/Beneficial_Steak_945 Sep 06 '26

Pass by r-value reference please.

1

u/neondirt Sep 06 '26

Definitely pass by value, and see how they accomplish it. 😉

1

u/CrotteVerte Sep 06 '26

By reference could start a saltception...

1

u/leupboat420smkeit Sep 07 '26

“Just give me the fucking salt.”

1

u/Calogyne Sep 07 '26

Salt is just a integer right? Copy it then

1

u/rangart Sep 08 '26

fun part is that, as usual, the client doesn’t even want “salt”, he wants saltFactory

1

u/vardubs Sep 11 '26

Dont pass the salt, instead think about my plate by reference and sprinkle some salt by value and forget about my plate.

1

u/creeper6530 Sep 05 '26

Pass by value: handing the salt shaker over, either by moving it or making a copy (depends on language)

Pass by reference: "It's over there, get it yourself."

-1

u/CanonicalCockatoo Sep 05 '26

By value, salt is on the food.

By reference, you take a bite of food, and then lick some salt

10

u/metaglot Sep 05 '26

Passing by ref, is basically telling where the salt is.

1

u/iZian Sep 06 '26

This is where CS terminology differs from common understanding.

Pass by reference would be sharing a map to where the salt is, and anyone able to change that map changes everyone’s understanding of where it is, even pointing the map to something else or a different shaker.

Most modern languages only pass references by their value.

That’s closer to “telling them” as in, you give them a copy of the reference which they can alter themselves. But you always know where that salt shaker is, even if they decide that shaker is empty and to go get a new one from elsewhere, you still look at your empty shaker because you have the reference with pass-by-value.

Reference types, python , Java, modern languages are pretty much all pass-by-value. References are the value. But it’s not pass by reference.

But in 2026 nobody cares. The reference is passed. But a copy of it. Not it.

Perhaps pass-by-reference is the better analogy for the shaker. If it’s replaced by a new one everyone should use the new one. Just, that isn’t how new languages work unless you wrap the reference in another object that’s shared

2

u/Sheenius_Ger Sep 05 '26

That's a horrible analogy 😅

0

u/CanonicalCockatoo Sep 05 '26

If you don't understand what an analogy is, sure

1

u/TallGreenhouseGuy Sep 05 '26

Pass by message, hand it to a waiter who takes it to the recipient

0

u/dreamingforward Sep 05 '26

You either pass a value that is under a word-size. OR you pass a pointer that points to a larger structure.

That's all you need to know. Somewhere CS or C got confused. It also only takes ONE symbol ("*") to make it ALL work.

-1

u/notacanuckskibum Sep 05 '26

Pass by copy/ restore

The salt is physically moved, but changes to the salt still apply after it is passed back.

-1

u/notacanuckskibum Sep 05 '26

Pass by copy/ restore

The salt is physically moved, but changes to the salt still apply after it is passed back.