give me a scenario where === is true but == isn't
>>56664777
You just posted one in your pic ffs
>>56664799
can you read ?
>>56664777
There is literally no reason to use ==.
OP === "faggot"
OP == "faggot"
My bad, this is always true.
OP === faggot
OP == not a faggot
yw.
>>56664777
I don't know what language that is, but I would think none exist; equal to would better be defined as "equal value".
I'm pretty sure === is (value == value && type==type) so any === evaluating to true would mean that == has to be true. But I'm not familiar with the language, so don't quote me with that.
Is this a language that I can override an object's .equalsTo() and .type() methods? Then maybe depending on the implementation of ===
>>56664777
Looks like the PHP manual page.. for all those asking what language
>>56664777x = "5"
"5"
x === 5
false
x == 5
true
>>56664777x = 5
x == "5"
x === "5"
this is not a hard concept
>>56665229
not that.
>>56664929
>>56665112
>>56665167
>>56665172
Javascript
>>56665332
I don't know javascript, can I override the type and value checks?
>>56665272
Return false
>>56665112
This.
>>56664809
Can you?
Do you not know what a type is?
>>56664777
Firstly its important to know why those two operators are different.
== will try to convert the types to be the same then compare their values.
=== will not convert types and just check if they're equal
So it doesn't make sense that === would be true and == is not unless the language is fundamentally broken.
>>56665237
>>56665411
Reading is hard.
>>56664777
>x = 5
>!(x === "5")
true
>!(x == "5")
false
>>56666705
kill yourself
I can accept that there is = for assignment and == for comparison, but you better have good syntax highlighting to catch whether you are using one or the other.
But why would you add fuzzy implementations?
When would you use this for other things than on strings?
And on strings, wouldn't you have something more than numbers in the string?
And if you already have to get the value, would it be too weird to make a conversion in all places?
What would the fourth be used for?
>>56664799
FPBP op can't handle the bantz
>>56667353
It could happen in the most pathological of situations.
A:
>f(x) == f(y)
B:
>g(x) == g(y)
If g modifies the values of x and y so that A would be true when it wasn't before g then it could work.