So, what is the Kotlin terminology for the this co...
# getting-started
k
So, what is the Kotlin terminology for the this code block? When you create an object and pass in a generic curly brace object with parameters set?
j
This is just a regular object declaration as far as Kotlin is concerned. It just so happens that
MyObject
in your specific case is a class that takes a constructor parameter of a function type, and that function has a receiver which has this
name
property. There is no special language feature involved