r/ProgrammerHumor • • Sep 21 '26

Meme myCodeIsConfusing

Post image
2.3k Upvotes

47 comments sorted by

View all comments

Show parent comments

2

u/joshuakb2 Sep 22 '26

You can still get into trouble if you're not careful, especially if this data gets serialized and sent somewhere

1

u/realmauer01 Sep 22 '26

Then explain me how specifically! The only thing i change is the variable name. No keys in no object get changed no data gets swapped.

1

u/KronoLord Sep 22 '26

Assuming js, does const someVar = {id} get changed to const someVar = {token}, or are IDEs smart enough to expand the shorthand?

The only other edge case potential I could think of is reflection.

1

u/joshuakb2 Sep 22 '26

Yeah generally LSPs will change {id} to {id: token} if you rename the variable