This and that keywords - difference


#1

I have searched Scala doc and do not see any explanation on “that” keyword.
if any one have a good explanation/example on how/where to use “this/that” keyword would be very usable.


#2

that is not a keyword. It’s just a name some people like to use for a variable that refers to an instance of the current class.

class A {
  def isTheSameAs(that: A) = this == that
}

#3

Thank you very much Jasper-M.