So then, your creative brains infer, I have discovered some way to shed the shackles of my keyboard and psychically imprint code onto disk. I wish.
Here's some code:
"1" == 1 // true "1" === 1 // false - triple equals is teh real deal s = "abc" s === "abc" // true s = new String("abc") s === "abc" // false - it's an object so equality doesn't work
Basically, it's triple equals or bust and woe to yea who accidentally "2" > 1 despite this conviction.
Experienced masochists will now be asking, "what about dates?"
Well, I thought things were ok. After some trepidation and testing, I discovered that date1 >= date2 actually works.
I stupidly thought that this implies equality would work as well.
Not so much. It turns out that equality always compares object references. Dates are, unfortunately, objects.
Apparently, in dynamic languages, "if it walks like a duck and farts like a duck, it's a duck".
"If it walks like a duck but fucks the neighbour's cat - probably not a duck?"
Or perhaps we need to observe the duck that might be to discover the duck that is. Quantum xen typing.
I propose a new term and would like to suggest we extend it to all languages that indulge the duck.