I am reading the book Kotlin in action and I ask myself what is the purpose of "creating an instance of a class using a constructor reference" (page 112 if anyone is interested and has the book at home).
Here is the code example from the book:
data class Person(val name: String, val age: Int)
val createPerson = ::Person
val p = createPerson("Alice", 29)
println(p) // Person(name=Alice, age=29)
I think it looks like an factory method call, but I dont think that this is the (only) purpose of the method reference here.
References to constructors are the part of Kotlin Reflection API. You can create an instance of a class through constructor reference even if that class is not even in your project (you get that reference from outside). Reflection is widely used by many libraries and frameworks (for example, GSON) that know nothing about your code but still are able to create instances of your classes.