title: Why getting class in Kotlin using double-colon (::)?
body: <p>We know that double-colon (<code>::</code>) is used to get function (callable) reference in Kotlin, e.g. <code>String::compareTo</code>, <code>"string"::compareTo</code>. </p>
  
  <p>In Java we use <code>SomeClass.class</code> and <code>someInstance.getClass()</code> to get the class. Why in Kotlin we use <code>SomeClass::class</code> and <code>someInstance::class</code> while <code>class</code> is not a function/method?</p>
  
  <pre><code>println(String::compareTo)
  // output: fun kotlin.String.compareTo(kotlin.String): kotlin.Int
  println("string".compareTo("strong"))
  // output: -6
  println(String::class)
  // output: class kotlin.String
  println("string".class)
  // compile error
  </code></pre>