498
you are viewing a single comment's thread
view the rest of the comments
[-] mmddmm@lemm.ee 30 points 6 days ago

The one option that is mandated by an ISO standard.

Besides, if max and min are going to have a value without any parameter, it has to be exactly those Javascript uses. Unless you have a type that define other bounds for your numbers. And null always have a pointer type (that is object in Javascript), for the same reason that NaN always have a number type.

The only one that is bad on that list is D.

[-] FooBarrington@lemmy.world 14 points 6 days ago

typeof null === "object" was actually a bug in the early implementations, and they decided to keep it in the spec: https://2ality.com/2013/10/typeof-null.html

(see the comment from Brendan Eich)

[-] gnutrino@programming.dev 19 points 6 days ago* (last edited 6 days ago)

Tony Hoare: "Introducing NULL was a billion-dollar mistake"

Brendan Eich: "Hold my undefined"

[-] FooBarrington@lemmy.world 22 points 6 days ago

We had one null, yes. But what about second null?

[-] owsei@programming.dev 8 points 6 days ago

Maybe D is too single quotes 0 == ''

[-] ByteJunk@lemmy.world 2 points 6 days ago

"This comparison appears to be unintentional"

[-] StopSpazzing@lemmy.world 5 points 6 days ago

D...Deez nutz!

this post was submitted on 17 May 2025
498 points (97.9% liked)

Programmer Humor

23417 readers
2287 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 2 years ago
MODERATORS