Safe and sound code with kotlin

Following my first talk about writing safe code in kotin at London Kotlin Meetup #2 I recently had one in Saint-Petersburg. It was organised by Spb Google Developers Group, namely by Oleg Makarov. Event took place in the most appropriate place – place where kotlin was born – Jetbrains “Universe” Office at Vasilyevskiy island (it’s not kotlin island as someone might think :D).

Topic of that talk was same as in London but reflected by received feedback plus some extra things.

The extra example was with typesafe units math. With kotlin it’s possible to work with different dimensions in very safe manner, so you won’t subtract liters from wats. In my basic example I work with distance, time and speed:

According to meetup.com there were ~100 people while I’d say ~80. After talk I was asked a lot of questions starting from presentation’s topics ending up with testing, frameworks and some hate of php and js of course.