Pattern matching in Kotlin

Lately I have been studying some modern languages, such as Reason, Swift, Kotlin and Dart. I got excited by many of the features they offer. Many of those features I had never read or heard of before. Today, I want to share with you the 10 features that I found most interesting.

I hope that in the coming years, features like these will become more widely adopted, also in older languages, such as Javascript, PHP, Java and Python. As many of us programmers have to work with those languages every day at work, I would love it if also those languages keep evolving.

Click on any of the Read more… links below to go to the documentation of the language. Often there is some playground that you can immediately start hacking with!

#1 Pipeline operator

I couldn’t find any official documentation from Reason, but it seems to work similar as this ECMAScript proposal. You can try it out in a playground here.

#2 Pattern matching

Read more…

Read more…

#3 Reactive (Rx) programming build in the language

Read more…

#4 Implicit name (using “it”) of a single parameter in a lambda function

Read more…

#5 Destructuring

Read more…

#6 Cascade operator

Read more…

#7 If expressions

Read more…

#8 Try expressions

Read more…

#9 Automatic currying

Read more…

#10 Method extensions

Read more…

I hope you have learned something new. Happy coding :)