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

Programmer Humor

24450 readers
59 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 31 points 1 month ago (7 children)

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.

[–] [email protected] 8 points 1 month ago (1 children)

Maybe D is too single quotes 0 == ''

[–] [email protected] 2 points 1 month ago

"This comparison appears to be unintentional"

load more comments (5 replies)