r/programminghumor • • Sep 25 '26 • Bravo 1

Tissues

Post image
1.8k Upvotes

31 comments sorted by

View all comments

69

u/MilkImpossible4192 Sep 25 '26

null is an object, 0 is a number, undefined is an undefined

14

u/joranmulderij Sep 25 '26

Yea this meme is kinda stupid

10

u/MilkImpossible4192 Sep 25 '26

NaN is stupid which is a number but means Not a Number

4

u/joranmulderij Sep 25 '26

Id made sense as part of the float spec when that was created. Now it is a lot less useful and the downsides mostly show. I kind of hate nan

3

u/bloody-albatross Sep 25 '26

What is stupid is that there is a language that has both null and undefined.

1

u/Confident-Ad5665 Sep 25 '26

I couldn't agree more.

How about that negative zero?

5

u/bloody-albatross Sep 25 '26

It's weird, but not specific to any language. It's again the IEEE floating point standard. I never had a use for it, but I also never had problems related to it.

7

u/ElGuaco Sep 25 '26

It depends on the language. In C# null is a literal value that refers to no object or memory location. For the pictures here, it would be like having a cardboard sign taped to the roll holder saying "null".

1

u/marssel56 Sep 26 '26

I think OP uses game maker language

1

u/RedAndBlack1832 Sep 27 '26 edited Sep 27 '26

Null is 0. Zero is 0. And undefined is undefined (as in: can literally be anything and isn't guaranteed to be consistent between invocations, introducing very bad nondeterminism)

1

u/MilkImpossible4192 Sep 27 '26

¿what? no.

[ +null is 0, +'0' is 0, +no is 0, not 0 is on ]