189

you are viewing a single comment's thread
view the rest of the comments
[-] nykula@piefed.social 2 points 1 day ago

== has never, ever caused me a single issue. Parsing all server input with type-safe schemas makes sure that where I expect a string, I get a string; where I expect a number, I get a number. Bad data must result in an error before it reaches logic.

[-] NateNate60@lemmy.world 13 points 1 day ago

"I have no problem living in a house of cards as I make sure to never bump against the walls."

[-] grue@lemmy.world 2 points 1 day ago

I wonder how many millions of programmer man-hours have been wasted working around JavaScript's design mistakes that could've been saved simply by putting Scheme or Python (which were actually being considered) in the browser instead.

[-] nykula@piefed.social 1 points 1 day ago

Opposite, living in a house of cards is when you blindly trust data that comes from user. Regardless of the language. eqeqeq isn't in the recommended linting presets because if you end up needing it, you're probably already in big trouble because of insecure software design.

[-] NateNate60@lemmy.world 2 points 22 hours ago

Nobody is advocating for blindly trusting data from the user.

[-] nykula@piefed.social 0 points 21 hours ago

Then where do you see the house of cards? What's the practical difference between == and ===, when your app is type-checked and the inputs are safely parsed?

[-] NateNate60@lemmy.world 1 points 6 hours ago

Because you don't know whether you've actually type-checked everything and that your inputs are safely parsed. Part of defensive programming is to adopt multiple defences to prevent bad data from getting through, including avoiding ==.

this post was submitted on 02 Nov 2026
189 points (97.5% liked)

Programmer Humor

33973 readers
284 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 3 years ago
MODERATORS