jameshart 2 days ago

A little bit of truthiness seems like a good idea at first. You decide to treat empty strings and undefined as falsy and it feels good, so you go ahead and start treating zero as falsy too.

And then all of a sudden code that is expecting to get an array or undefined gets handed a zero or an empty string because someone called it with

   x && [x]
Or

   x.length && x
And that’s how you end up with a zero showing up on a webpage instead of a list of to-do items when the list is empty.
tialaramex 2 days ago

What does "useful" mean here? Useful the way it'd be useful if butter knives could also cut trees down more easily or if hats were also televisions - ie more uses = more useful?

Programming languages aren't for the machine, they're for humans, and humans make mistakes so we need to design the language with that in mind. "Truthiness" is a footgun, it increases the chance you'll write something you did not mean without even realising.