punycode: use strict identity operator#35
punycode: use strict identity operator#35JungMinu wants to merge 1 commit intomathiasbynens:masterfrom
Conversation
There is no type-conversion to be done because both parameters are already the same type. Therefore, the === operator should be used for better performance.
|
Please refer to the following review |
|
I seriously doubt |
|
@mathiasbynens Do you prefer == to === in general? |
|
@JungMinu Yeah, in all my code I’ve only been using |
|
@mathiasbynens Don't you think that there are some side-effects when using == in general? Can I ask you please tell me why you prefer ==? |
|
@JungMinu I agree, but in my own code I know which types to expect, so none of those side effects apply here. |
|
@mathiasbynens Well, is there any benefit when using == rather than === whenever possible? |
|
Using |
75532e6 to
952c3ea
Compare
|
No longer applicable. |
There is no type-conversion to be done because both parameters are already the same type.
Therefore, the === operator should be used for better performance.