this post was submitted on 08 Oct 2023
1015 points (96.6% liked)

Programmer Humor

19187 readers
1273 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] SquishyPandaDev@yiffit.net 43 points 11 months ago (13 children)

Obligatory, mutable global variables are evil.

[–] magic_lobster_party@kbin.social 29 points 11 months ago (8 children)

The definition of a variable is that it’s mutable. If it’s immutable it’s constant.

[–] marcos@lemmy.world 13 points 11 months ago (6 children)

There's no ISO standardized definition for variable. People use that word with all kinds of meaning.

[–] Yen@feddit.uk 10 points 11 months ago (1 children)

This is needlessly obtuse. The definition of the word is that it's non-constant. There isn't an ISO definition of the word no, but there are many reputable dictionaries out there that will serve as an alternative.

[–] marcos@lemmy.world 3 points 11 months ago (1 children)

Well, starting with the definition from algebra, where it's not something allowed to vary...

I guess more people know about math than use imperative programing languages.

[–] SkyeStarfall@lemmy.blahaj.zone 2 points 11 months ago* (last edited 11 months ago) (1 children)

Except that's exactly what it is allowed to in algebra.

Sure, in most equations you solve in early algebra school there is only one possible value for the variables. But in many equations there can be multiple, or even infinite. It's an unknown, and the contents can vary (depending on other constraints, ie. The rest of the equation(s)).

[–] marcos@lemmy.world 1 points 11 months ago

There's no time in algebra for your variables to vary.

When you have a non-unitary set of solutions, you have a constant non-unitary set of solutions.

load more comments (4 replies)
load more comments (5 replies)
load more comments (9 replies)