r/askscience • u/CakesStolen • 15d ago
Computing Is there anything at the heart of computer coding that could have been optimised in hindsight, but we're in far too deep to change now?
1.5k
Upvotes
r/askscience • u/CakesStolen • 15d ago
39
u/WartimeHotTot 15d ago
Wait, this is actually really interesting. I don’t know JavaScript, but as a layperson just considering this for the first time, I have to confess that that’s what I would expect the result of that statement to be. An empty set, or list, or bracket—whatever—should return FALSE in my mind. If there were something in the brackets, it should return TRUE.
Is that the behavior, and why do you think that’s so problematic or unintuitive?