title: Should we avoid naming a function same as an existing class in Kotlin? Why?
body: <p>Kotlin allows to name a function same as an existing class, e.g. <code>HashSet</code> with initializer function could be implemented like this: </p>
  
  <pre><code>fun &lt;T&gt; HashSet(n : Int, fn: (Int) -&gt; T) = HashSet&lt;T&gt;(n).apply {
      repeat(n) {
          add(fn(it))
      }
  }
  </code></pre>
  
  <p>When used, it looks like a normal <code>HashSet</code> constructor:</p>
  
  <pre><code>var real = HashSet&lt;String&gt;()
  var fake = HashSet(5) { "Element $it" }
  </code></pre>
  
  <p>Should this be avoided or encouraged and why?</p>