Take a look at Kotlin, it perfected this idea
What Kotlin offers is already present in Scala or other languages from ML linage.