43
Holy variable! (lemmy.world)
top 9 comments
sorted by: hot top controversial new old
[-] preciouspupp@sopuli.xyz 5 points 1 year ago

Let’s call it “singleton”, then it’s ok.

[-] Scrappy@feddit.nl 5 points 1 year ago
[-] SwellowTheSun@lemmy.world 1 points 1 year ago
[-] hadesflames@vlemmy.net 5 points 1 year ago* (last edited 1 year ago)

Funny, take an upvote

But honestly, I have not used global variable in over a decade. It's completely unnecessary

[-] EN20@feddit.de 3 points 1 year ago

It's more difficult when you work with a huge legacy code base that is full of them and you have to do days of work in oder to rewrite and test everything rather then just use one.

[-] azimir@lemmy.ml 3 points 1 year ago

Once the code has given into the temptation, every generation must bear the cost of those sins.

Yeah, I hear you on being handed the legacy base where someone in days of yore gave into the global temptation. Trying to refactor that kind of thing can take forever and it's often very brittle.

[-] RagingNerdoholic@lemmy.ca 3 points 1 year ago* (last edited 1 year ago)

CONSTANTS: oh yes daddy, don't stop

[-] darcy@sh.itjust.works 2 points 1 year ago

image source ? uhh for a friend

[-] Crackhappy@lemmy.world 2 points 1 year ago

Goddamnit, that made me laugh entirely too hard.

this post was submitted on 13 Jun 2023
43 points (97.8% liked)

Programmer Humor

32584 readers
1101 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS