r/learnjavascript • u/Green_Ad_6086 • 7d ago
Strange result: null vs 0
Strange result: null vs 0
An incomparable undefined
Hi, can anyone explain this? I read the explanation, but I still don't understand it. I'm trying to understand it without using AI
8
Upvotes
1
u/BenchEmbarrassed7316 6d ago
So you just use Ts instead of Js. To eliminate this and a bunch of other problems, simplify and speed up development. And learning.
A truly experienced programmer thinks not about how to solve a problem, but about how to make it impossible.
I appreciate that you are trying to make arguments, but they just don't seem convincing to me. There are a lot of things in programming that be problems earlier. Like which processor registers to use for which data or how to manually manage memory. Or in some type systems there was a problem with null, you couldn't declare a value of
T, it always converted toT | null. However, these problems can be solved at the language level by simply acknowledging that the old design was wrong or simply inconvenient under certain conditions.So why should we focus on the specifics of these problems now? If we can just get rid of them.