https://kotlinlang.org logo
e

elizarov

01/09/2019, 9:09 PM
I think this feature is called “a class” in Kotlin. Declare
class Person(val name: String, val date: String)
, then use
Person("John", "09-10-1974")
instead of
mapOf (:name to "John", :date to "09-10-1974)
. Now instead of
person[:name]
in Kotlin you do
person.name
.
👌 4