486
you are viewing a single comment's thread
view the rest of the comments
[-] mmddmm@lemm.ee 30 points 2 months 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 2 months 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 2 months ago* (last edited 2 months ago)

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

Brendan Eich: "Hold my undefined"

[-] FooBarrington@lemmy.world 20 points 2 months ago

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

[-] owsei@programming.dev 8 points 2 months ago

Maybe D is too single quotes 0 == ''

[-] ByteJunk@lemmy.world 2 points 2 months ago

"This comparison appears to be unintentional"

[-] StopSpazzing@lemmy.world 4 points 2 months ago

D...Deez nutz!

this post was submitted on 17 May 2025
486 points (100.0% liked)

Programmer Humor

25407 readers
1545 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