https://kotlinlang.org logo
Title
h

Hamza

10/16/2018, 9:41 AM
Who here has actually used === on their code? Why did you use it? I personally have never needed to
n

Nikky

10/16/2018, 9:45 AM
===
is comparing reference quality right? never found a use or need
r

robstoll

10/16/2018, 9:48 AM
Using it when comparing object of sealed classes
h

Hamza

10/16/2018, 9:52 AM
Hmm that's actually a good use case
r

robstoll

10/16/2018, 9:53 AM
lot of times I use a
when
though
h

Hamza

10/16/2018, 9:53 AM
Yah. I mostly just use when as well
e

Egor Trutenko

10/16/2018, 9:54 AM
Also, objects are as well comparable via
is
d

Dias

10/16/2018, 9:57 AM
in the tests?
h

Hamza

10/16/2018, 10:10 AM
Haha I don't write tests
😂 1
k

karelpeeters

10/16/2018, 12:46 PM
When you're dealing with mutable data structures
===
is sometimes necessary to make sure you don't accidentally share an instance.