The Kotlin Programming LanguagePublished on 21 April 2019 (Updated: 02 May 2020)
Since Kotlin is a bit more popular than most of the newer languages, it actually has a Wikipedia page. So, we’ll use that to learn more.
In terms of features, Kotlin offers an aggressive form of type inference. In other words, the language supports static type checking on implicit types. Of course, the benefit is a far less verbose syntax than Java.
Of course, I think my favorite feature is extension methods. In Kotlin, we can take a class that already exists and tack on our own methods without creating an extension class. For instance, Wikipedia shares the following snippet:
fun String.lastChar(): Char = this.get(this.length - 1)
In this example, the lastChar method is added to the String class. How cool is that?
Baklava in Kotlin on 22 October 2020 by Stuart Irwin
Fizz Buzz in Kotlin on 28 October 2020 by Stuart Irwin
Hello World in Kotlin on 03 April 2019 by Jeremy Grifski
- Hello World in Kotlin on The Renegade Coder