Introduction to Type Safety in Kotlin
We'll cover the following...
The more statically typed a language is, the more readily it should ensure type safety, but without the need to excessively specify types. Kotlin works hard to make your code more type safe and less error prone with enhanced null
checks, smart type casting, and fluent type checking. In this chapter, you’ll learn about a few basic types in Kotlin and the effective type checking capabilities built in to the compiler. We’ll also look at how Kotlin fails fast at compile time to prevent many errors from sneaking into runtimes—this will make your programming efforts more productive.
Can you imagine turning on the television and getting a ...