$ ./guess_the_languageProgramming Languages
Programming Languages · medium · #546

Which programming language is this?

val user = User("ana").apply {
    email = "ana@example.com"
    age = 30
}
println(user.email ?: "no email")

Answer: Kotlin

The .apply { } scope function and the ?: Elvis operator with println are Kotlin idioms.
Play Programming Languages ▸