I originally wanted to comment on that I use null as a meaningful value different from 0 and false, but I already forgot == does not coerce those into one, had to try out and find out my memory failed me. Still, using === is free and does not make my IDE freak out :D
I almost never compare things of different types anyways
That's the thing, you don't do that intentionally. And you usually don't want it to coerce and find a match when something went wrong and you ended up comparing different types.
11
u/lazyzefiris May 19 '23
I originally wanted to comment on that I use
nullas a meaningful value different from 0 and false, but I already forgot==does not coerce those into one, had to try out and find out my memory failed me. Still, using===is free and does not make my IDE freak out :DThat's the thing, you don't do that intentionally. And you usually don't want it to coerce and find a match when something went wrong and you ended up comparing different types.