I’m slightly surprised that Kotlin allows === equality checking for null

For reference: https://kotlinlang.org/docs/equality.html#structural-equality

There’s no difference between == and === when comparing against null, anyway. So, it seems like === should be deprecated the same way that comparing “primitives” (Int, String, etc) and value/inline classes is.

I wonder if this is just vestigial or if there’s some actual reason that the Kotlin designers don’t want to deprecate the === equality syntax.

submitted by /u/ragnese
[link] [comments]